@ray-js/ipc-player-integration 0.0.29-beta.2 → 0.0.29-beta.21
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.composition.d.ts +9 -3
- package/lib/ctx/ctx.composition.js +43 -1
- package/lib/ctx/ctx.js +5 -0
- package/lib/ctx/multiCameraCtx.d.ts +40 -5
- package/lib/ctx/multiCameraCtx.js +166 -20
- package/lib/features/initPlayerWidgets/index.d.ts +7 -1
- package/lib/features/initPlayerWidgets/index.js +14 -11
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +3 -1
- package/lib/hooks/useDpSupport/index.d.ts +6 -0
- package/lib/hooks/useDpSupport/index.js +47 -0
- package/lib/hooks/useSignal4G/index.d.ts +2 -0
- package/lib/hooks/useSignal4G/index.js +35 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/interface.d.ts +43 -2
- package/lib/ports.output.d.ts +4 -0
- package/lib/ports.output.js +3 -1
- package/lib/res/index.d.ts +1 -0
- package/lib/res/index.js +21 -1
- package/lib/res/svg/signalFour0.svg +1 -0
- package/lib/res/svg/signalFour1.svg +1 -0
- package/lib/res/svg/signalFour2.svg +1 -0
- package/lib/res/svg/signalFour3.svg +1 -0
- package/lib/res/svg/signalFour4.svg +1 -0
- package/lib/res/svg/signalThree0.svg +1 -0
- package/lib/res/svg/signalThree1.svg +1 -0
- package/lib/res/svg/signalThree2.svg +1 -0
- package/lib/res/svg/signalThree3.svg +1 -0
- package/lib/svg-module.d.ts +4 -0
- package/lib/ui/constant.d.ts +20 -0
- package/lib/ui/constant.js +21 -0
- package/lib/ui/index.d.ts +2 -0
- package/lib/ui/index.js +3 -1
- package/lib/ui/ui.d.ts +2 -0
- package/lib/ui/ui.js +130 -38
- package/lib/ui/ui.less +33 -4
- package/lib/ui/widgetClick.d.ts +2 -0
- package/lib/ui/widgetClick.js +2 -0
- package/lib/utils/content/dpCode.d.ts +5 -0
- package/lib/utils/content/dpCode.js +11 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +12 -1
- package/lib/utils/videoSplitHelper.d.ts +18 -0
- package/lib/utils/videoSplitHelper.js +48 -0
- package/lib/widgets/fullScreen/fullScreen.js +6 -4
- package/lib/widgets/fullScreen/fullTravelRouteControl.js +4 -1
- package/lib/widgets/fullScreen/fullVoiceIntercom.js +5 -2
- package/lib/widgets/fullScreen/verticalScreen.js +1 -1
- package/lib/widgets/fullSmallIntercom/fullSmallIntercom.js +4 -1
- package/lib/widgets/index.d.ts +2 -0
- package/lib/widgets/index.js +3 -1
- package/lib/widgets/moveInteractiveControl/controlButton.js +4 -1
- package/lib/widgets/moveInteractiveControl/moveInteractiveControl.js +7 -1
- package/lib/widgets/multiCamera/index.less +28 -5
- package/lib/widgets/multiCamera/moveablePtzControl.js +229 -47
- package/lib/widgets/multiCamera/tileActions.js +2 -2
- package/lib/widgets/muted/muted.js +12 -11
- package/lib/widgets/ptz/ptz.js +4 -1
- package/lib/widgets/ptzControlTip/ptzControlTip.js +4 -1
- package/lib/widgets/recordVideo/recordVideo.js +6 -1
- package/lib/widgets/resolution/fullResolutionControl.js +10 -2
- package/lib/widgets/resolution/resolution.js +4 -1
- package/lib/widgets/screenshot/screenshot.js +6 -1
- package/lib/widgets/signal4G/index.d.ts +1 -0
- package/lib/widgets/signal4G/index.js +1 -0
- package/lib/widgets/signal4G/signal4G.d.ts +8 -0
- package/lib/widgets/signal4G/signal4G.js +28 -0
- package/lib/widgets/signal4G/signal4G.less +15 -0
- package/lib/widgets/toggleVerticalFull/index.d.ts +1 -0
- package/lib/widgets/toggleVerticalFull/index.js +1 -0
- package/lib/widgets/toggleVerticalFull/toggleVerticalFull.d.ts +8 -0
- package/lib/widgets/toggleVerticalFull/toggleVerticalFull.js +32 -0
- package/lib/widgets/toggleVerticalFull/toggleVerticalFull.less +4 -0
- package/lib/widgets/verticalSmallIntercom/verticalSmallIntercom.js +4 -1
- package/lib/widgets/voiceIntercom/voiceIntercom.js +18 -21
- package/lib/widgets/voiceIntercom/voiceIntercom.less +85 -0
- package/package.json +6 -7
- package/lib/features/initPlayerWidgets/multiCamera.d.ts +0 -8
- package/lib/features/initPlayerWidgets/multiCamera.js +0 -78
- package/lib/widgets/battery/battery.composition.d.ts +0 -155
- package/lib/widgets/voiceIntercom/voiceIntercom.d.ts +0 -93
|
@@ -6,7 +6,7 @@ import { goToIpcPageNativeRoute } from '@ray-js/ray-ipc-utils';
|
|
|
6
6
|
import Strings from '../../i18n';
|
|
7
7
|
import { PlayState } from '../../interface';
|
|
8
8
|
import { UIEventContext } from '../../ui/context';
|
|
9
|
-
import { pauseTimeToHideAllComponent, changeIgnoreHideStopPreview } from '../../ui/constant';
|
|
9
|
+
import { pauseTimeToHideAllComponent, changeIgnoreHideStopPreview, widgetLabs, widgetClick } from '../../ui/constant';
|
|
10
10
|
import { useStore, getDefaultStore } from '../../ctx/store';
|
|
11
11
|
import './recordVideo.less';
|
|
12
12
|
const CLOSE_TIME = 5000;
|
|
@@ -230,6 +230,11 @@ export function RecordVideo(props) {
|
|
|
230
230
|
});
|
|
231
231
|
};
|
|
232
232
|
const handRecordVideo = async () => {
|
|
233
|
+
var _props$event, _props$event2;
|
|
234
|
+
(_props$event = props.event) !== null && _props$event !== void 0 ? _props$event : event;
|
|
235
|
+
((_props$event2 = props.event) !== null && _props$event2 !== void 0 ? _props$event2 : event).emit(widgetClick, {
|
|
236
|
+
widgetId: widgetLabs.RECORD_VIDEO
|
|
237
|
+
});
|
|
233
238
|
event.emit(pauseTimeToHideAllComponent);
|
|
234
239
|
const store = getDefaultStore();
|
|
235
240
|
const _recording = store.get(recordingAtom);
|
|
@@ -7,7 +7,7 @@ import Strings from '../../i18n';
|
|
|
7
7
|
import { useMemoizedFn } from '../../hooks';
|
|
8
8
|
import { useStore } from '../../ctx/store';
|
|
9
9
|
import { UIEventContext } from '../../ui/context';
|
|
10
|
-
import { playerTap, showAllComponent, pauseTimeToHideAllComponent } from '../../ui/constant';
|
|
10
|
+
import { playerTap, showAllComponent, pauseTimeToHideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
|
|
11
11
|
import './resolution.less';
|
|
12
12
|
export const FullResolutionControl = props => {
|
|
13
13
|
const {
|
|
@@ -69,7 +69,15 @@ export const FullResolutionControl = props => {
|
|
|
69
69
|
'ipc-plugin-absolute-move-in-right-hide': hide
|
|
70
70
|
})
|
|
71
71
|
}, resolutionList.map(item => /*#__PURE__*/React.createElement(Text, {
|
|
72
|
-
onClick: () =>
|
|
72
|
+
onClick: () => {
|
|
73
|
+
event.emit(widgetClick, {
|
|
74
|
+
widgetId: widgetLabs.FULL_RESOLUTION_CONTROL,
|
|
75
|
+
extra: {
|
|
76
|
+
resolution: item
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
changeResolution(item);
|
|
80
|
+
},
|
|
73
81
|
key: item,
|
|
74
82
|
className: clsx('ipc-player-plugin-full-resolution-control-text'),
|
|
75
83
|
style: item === resolution && {
|
|
@@ -5,7 +5,7 @@ import React, { useContext } from 'react';
|
|
|
5
5
|
import { useMemoizedFn } from 'ahooks';
|
|
6
6
|
import Strings from '../../i18n';
|
|
7
7
|
import { FullResolutionControl } from './fullResolutionControl';
|
|
8
|
-
import { fullResolutionId, pauseTimeToHideAllComponent, hideAllComponent } from '../../ui/constant';
|
|
8
|
+
import { fullResolutionId, pauseTimeToHideAllComponent, hideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
|
|
9
9
|
import { UIEventContext } from '../../ui/context';
|
|
10
10
|
import { useStore } from '../../ctx/store';
|
|
11
11
|
import './resolution.less';
|
|
@@ -30,6 +30,9 @@ export const Resolution = props => {
|
|
|
30
30
|
event
|
|
31
31
|
} = useContext(UIEventContext);
|
|
32
32
|
const onResolution = useMemoizedFn(() => {
|
|
33
|
+
event.emit(widgetClick, {
|
|
34
|
+
widgetId: widgetLabs.RESOLUTION
|
|
35
|
+
});
|
|
33
36
|
event.emit('resolutionBtnControlClick');
|
|
34
37
|
console.log(`screenType: ${screenType}`);
|
|
35
38
|
if (screenType === 'full') {
|
|
@@ -6,7 +6,7 @@ import { goToIpcPageNativeRoute } from '@ray-js/ray-ipc-utils';
|
|
|
6
6
|
import Strings from '../../i18n';
|
|
7
7
|
import { useStore } from '../../ctx/store';
|
|
8
8
|
import { UIEventContext } from '../../ui/context';
|
|
9
|
-
import { pauseTimeToHideAllComponent, changeIgnoreHideStopPreview } from '../../ui/constant';
|
|
9
|
+
import { pauseTimeToHideAllComponent, changeIgnoreHideStopPreview, widgetLabs, widgetClick } from '../../ui/constant';
|
|
10
10
|
import './screenshot.less';
|
|
11
11
|
const CLOSE_TIME = 5000;
|
|
12
12
|
export function Screenshot(props) {
|
|
@@ -102,6 +102,11 @@ export function Screenshot(props) {
|
|
|
102
102
|
timeToCloseToast();
|
|
103
103
|
};
|
|
104
104
|
const handClick = useMemoizedFn(() => {
|
|
105
|
+
var _props$event, _props$event2;
|
|
106
|
+
(_props$event = props.event) !== null && _props$event !== void 0 ? _props$event : event;
|
|
107
|
+
((_props$event2 = props.event) !== null && _props$event2 !== void 0 ? _props$event2 : event).emit(widgetClick, {
|
|
108
|
+
widgetId: widgetLabs.SCREENSHOT
|
|
109
|
+
});
|
|
105
110
|
console.log('截屏!!!');
|
|
106
111
|
setState({
|
|
107
112
|
showShot: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './signal4G';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './signal4G';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentConfigProps } from '../../interface';
|
|
3
|
+
import './signal4G.less';
|
|
4
|
+
interface IProp extends ComponentConfigProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Signal4G: (props: IProp) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Image } from '@ray-js/ray';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useSignal4G } from '../../hooks';
|
|
5
|
+
import { signalSvgMap } from '../../res';
|
|
6
|
+
import './signal4G.less';
|
|
7
|
+
export const Signal4G = props => {
|
|
8
|
+
const {
|
|
9
|
+
className,
|
|
10
|
+
devId
|
|
11
|
+
} = props;
|
|
12
|
+
const {
|
|
13
|
+
dpValue,
|
|
14
|
+
signalKey
|
|
15
|
+
} = useSignal4G(devId);
|
|
16
|
+
if (dpValue === '' || !signalSvgMap[signalKey]) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
20
|
+
className: clsx(className)
|
|
21
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
22
|
+
className: clsx('ipc-player-plugin-signal4g')
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
24
|
+
className: clsx('ipc-player-plugin-signal4g-icon'),
|
|
25
|
+
src: signalSvgMap[signalKey],
|
|
26
|
+
mode: "aspectFit"
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.ipc-player-plugin-signal4g {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: calc(24px * var(--ipc-player-size-scale, 1));
|
|
5
|
+
padding: 0 calc(12px * var(--ipc-player-size-scale, 1));
|
|
6
|
+
border-radius: calc(24px * var(--ipc-player-size-scale, 1));
|
|
7
|
+
color: var(--iconColor);
|
|
8
|
+
font-size: calc(12px * var(--ipc-player-size-scale, 1));
|
|
9
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
10
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
11
|
+
}
|
|
12
|
+
.ipc-player-plugin-signal4g-icon {
|
|
13
|
+
width: calc(20px * var(--ipc-player-size-scale, 1));
|
|
14
|
+
height: calc(20px * var(--ipc-player-size-scale, 1));
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toggleVerticalFull';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toggleVerticalFull';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentConfigProps } from '../../interface';
|
|
3
|
+
import './toggleVerticalFull.less';
|
|
4
|
+
type Props = ComponentConfigProps & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function ToggleVerticalFull(props: Props): React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Text, View } from '@ray-js/ray';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useStore } from '../../ctx/store';
|
|
5
|
+
import './toggleVerticalFull.less';
|
|
6
|
+
export function ToggleVerticalFull(props) {
|
|
7
|
+
const {
|
|
8
|
+
className,
|
|
9
|
+
screenType: screenTypeAtom,
|
|
10
|
+
isVerticalFullLayout: isVerticalFullLayoutAtom,
|
|
11
|
+
setIsVerticalFullLayout
|
|
12
|
+
} = props;
|
|
13
|
+
const {
|
|
14
|
+
screenType,
|
|
15
|
+
isVerticalFullLayout
|
|
16
|
+
} = useStore({
|
|
17
|
+
screenType: screenTypeAtom,
|
|
18
|
+
isVerticalFullLayout: isVerticalFullLayoutAtom
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// 横屏时隐藏
|
|
22
|
+
if (screenType === 'full') return null;
|
|
23
|
+
const iconClassName = isVerticalFullLayout ? 'icon-panel-collapse' : 'icon-panel-expand';
|
|
24
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
25
|
+
className: clsx(className),
|
|
26
|
+
onTouchStart: () => {
|
|
27
|
+
setIsVerticalFullLayout(!isVerticalFullLayout);
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
30
|
+
className: clsx(['icon-panel', iconClassName, 'toggle-vertical-full'])
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
@@ -3,7 +3,7 @@ import React, { useContext } from 'react';
|
|
|
3
3
|
import { View } from '@ray-js/ray';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useStore } from '../../ctx/store';
|
|
6
|
-
import { pauseTimeToHideAllComponent } from '../../ui/constant';
|
|
6
|
+
import { pauseTimeToHideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
|
|
7
7
|
import { UIEventContext } from '../../ui/context';
|
|
8
8
|
import { VoiceIntercom } from '../voiceIntercom';
|
|
9
9
|
import './verticalSmallIntercom.less';
|
|
@@ -27,6 +27,9 @@ export function VerticalSmallIntercom(props) {
|
|
|
27
27
|
event
|
|
28
28
|
} = useContext(UIEventContext);
|
|
29
29
|
const onTouchStart = () => {
|
|
30
|
+
event.emit(widgetClick, {
|
|
31
|
+
widgetId: widgetLabs.VERTICAL_SMALL_INTERCOM
|
|
32
|
+
});
|
|
30
33
|
event.emit(pauseTimeToHideAllComponent);
|
|
31
34
|
};
|
|
32
35
|
const onTouchEnd = () => {
|
|
@@ -2,13 +2,12 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import React, { useRef, useContext, useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
3
3
|
import { View, Image, getSystemInfoSync } from '@ray-js/ray';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import Svg from '@ray-js/svg';
|
|
6
5
|
import { useStore, getDefaultStore, updateAtom } from '../../ctx/store';
|
|
7
6
|
import './voiceIntercom.less';
|
|
8
7
|
import { PlayerStreamStatus, IntercomMode, PlayState } from '../../interface';
|
|
9
8
|
import { UIEventContext } from '../../ui/context';
|
|
10
9
|
import { radialGradient } from '../../utils';
|
|
11
|
-
import { startTimeToHideAllComponent, pauseTimeToHideAllComponent, changeIgnoreHideStopPreview } from '../../ui/constant';
|
|
10
|
+
import { startTimeToHideAllComponent, pauseTimeToHideAllComponent, changeIgnoreHideStopPreview, widgetLabs, widgetClick } from '../../ui/constant';
|
|
12
11
|
const NILL = () => null;
|
|
13
12
|
export const VoiceIntercom = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
13
|
const {
|
|
@@ -27,8 +26,7 @@ export const VoiceIntercom = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
27
26
|
onTouchStart = NILL,
|
|
28
27
|
onTouchEnd = NILL,
|
|
29
28
|
mode = 'circle',
|
|
30
|
-
|
|
31
|
-
heightScale = 0.12,
|
|
29
|
+
scale = 1,
|
|
32
30
|
talkingColor = '#ffffff',
|
|
33
31
|
bgColor,
|
|
34
32
|
disabled = false
|
|
@@ -106,7 +104,12 @@ export const VoiceIntercom = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
106
104
|
event.emit(startTimeToHideAllComponent);
|
|
107
105
|
};
|
|
108
106
|
const handTouchStart = async e => {
|
|
107
|
+
var _props$event, _props$event2;
|
|
109
108
|
if (disabled) return;
|
|
109
|
+
(_props$event = props.event) !== null && _props$event !== void 0 ? _props$event : event;
|
|
110
|
+
((_props$event2 = props.event) !== null && _props$event2 !== void 0 ? _props$event2 : event).emit(widgetClick, {
|
|
111
|
+
widgetId: widgetLabs.VOICE_INTERCOM
|
|
112
|
+
});
|
|
110
113
|
onTouchStart(e);
|
|
111
114
|
getDefaultStore();
|
|
112
115
|
if (loading.current) return;
|
|
@@ -177,10 +180,6 @@ export const VoiceIntercom = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
177
180
|
}, [intercom]);
|
|
178
181
|
|
|
179
182
|
// 根据当前帧和矩形索引计算高度
|
|
180
|
-
const getHeight = (frame, index) => {
|
|
181
|
-
const animationFactor = Math.sin((frame + index) / 5) * 20; // 使用正弦波来模拟动态变化
|
|
182
|
-
return [50, 130, 180, 130, 50][index] + animationFactor; // 可以根据需求修改此逻辑
|
|
183
|
-
};
|
|
184
183
|
|
|
185
184
|
// 渲染对讲中的动画
|
|
186
185
|
|
|
@@ -200,20 +199,18 @@ export const VoiceIntercom = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
200
199
|
className: clsx({
|
|
201
200
|
'ipc-player-plugin-voice-small-ing-intercom': mode !== 'circle'
|
|
202
201
|
})
|
|
203
|
-
}, /*#__PURE__*/React.createElement(
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
202
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
203
|
+
className: clsx('bars'),
|
|
204
|
+
style: {
|
|
205
|
+
transform: `scale(${scale})`,
|
|
206
|
+
transformOrigin: 'center'
|
|
207
|
+
}
|
|
208
|
+
}, [0, 1, 2, 3, 4].map(index => /*#__PURE__*/React.createElement(View, {
|
|
208
209
|
key: index,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
fill: talkingColor,
|
|
214
|
-
rx: index === 0 || index === 4 ? 1 : 2 // 控制圆角
|
|
215
|
-
,
|
|
216
|
-
ry: index === 0 || index === 4 ? 1 : 2
|
|
210
|
+
className: clsx('bar'),
|
|
211
|
+
style: {
|
|
212
|
+
background: talkingColor
|
|
213
|
+
}
|
|
217
214
|
})))))() : (() => {
|
|
218
215
|
if (icon) {
|
|
219
216
|
if (typeof icon === 'string') {
|
|
@@ -66,3 +66,88 @@
|
|
|
66
66
|
width: 42%;
|
|
67
67
|
height: 42%;
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
.bars {
|
|
71
|
+
padding: 0 1px;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bar {
|
|
78
|
+
width: 2px;
|
|
79
|
+
background: white;
|
|
80
|
+
margin: 0 1px;
|
|
81
|
+
border-radius: 5px;
|
|
82
|
+
animation-duration: 0.5s !important;
|
|
83
|
+
animation-timing-function: ease-in-out;
|
|
84
|
+
animation-iteration-count: infinite;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.bar:nth-child(1) {
|
|
88
|
+
height: 5px;
|
|
89
|
+
animation-name: bounce1;
|
|
90
|
+
animation-delay: -0.4s;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.bar:nth-child(2) {
|
|
94
|
+
height: 10px;
|
|
95
|
+
animation-name: bounce2;
|
|
96
|
+
animation-delay: -0.2s;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bar:nth-child(3) {
|
|
100
|
+
height: 16px;
|
|
101
|
+
animation-name: bounce3;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bar:nth-child(4) {
|
|
105
|
+
height: 10px;
|
|
106
|
+
animation-name: bounce2;
|
|
107
|
+
animation-delay: -0.2s;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.bar:nth-child(5) {
|
|
111
|
+
height: 5px;
|
|
112
|
+
animation-name: bounce1;
|
|
113
|
+
animation-delay: -0.4s;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@keyframes bounce1 {
|
|
117
|
+
0%,
|
|
118
|
+
100% {
|
|
119
|
+
transform: scaleY(1);
|
|
120
|
+
}
|
|
121
|
+
50% {
|
|
122
|
+
transform: scaleY(1.5);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@keyframes bounce2 {
|
|
127
|
+
0%,
|
|
128
|
+
100% {
|
|
129
|
+
transform: scaleY(1);
|
|
130
|
+
}
|
|
131
|
+
50% {
|
|
132
|
+
transform: scaleY(1.4);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes bounce3 {
|
|
137
|
+
0%,
|
|
138
|
+
100% {
|
|
139
|
+
transform: scaleY(1);
|
|
140
|
+
}
|
|
141
|
+
50% {
|
|
142
|
+
transform: scaleY(1.2);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// @keyframes bars-move {
|
|
147
|
+
// 0% {
|
|
148
|
+
// transform: translateX(0) translateY(-50%) rotate(45deg);
|
|
149
|
+
// }
|
|
150
|
+
// 100% {
|
|
151
|
+
// transform: translateX(10px) translateY(-50%) rotate(45deg);
|
|
152
|
+
// }
|
|
153
|
+
// }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ipc-player-integration",
|
|
3
|
-
"version": "0.0.29-beta.
|
|
3
|
+
"version": "0.0.29-beta.21",
|
|
4
4
|
"description": "IPC 融合播放器",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -36,10 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ray-js/direction-control": "^0.0.8",
|
|
39
|
-
"@ray-js/ipc-ptz-zoom": "0.0.3-beta-
|
|
40
|
-
"@ray-js/
|
|
41
|
-
"@ray-js/ray-ipc-
|
|
42
|
-
"@ray-js/ray-ipc-utils": "^1.1.10",
|
|
39
|
+
"@ray-js/ipc-ptz-zoom": "0.0.3-beta-2",
|
|
40
|
+
"@ray-js/ray-ipc-player": "2.1.0-beta.2",
|
|
41
|
+
"@ray-js/ray-ipc-utils": "1.1.13-beta.1",
|
|
43
42
|
"@ray-js/svg": "0.2.0",
|
|
44
43
|
"clsx": "^1.2.1",
|
|
45
44
|
"color": "^5.0.2",
|
|
@@ -48,8 +47,8 @@
|
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@commitlint/cli": "^7.2.1",
|
|
50
49
|
"@commitlint/config-conventional": "^9.0.1",
|
|
51
|
-
"@ray-js/cli": "^1.7.
|
|
52
|
-
"@ray-js/ray": "^1.7.
|
|
50
|
+
"@ray-js/cli": "^1.7.61",
|
|
51
|
+
"@ray-js/ray": "^1.7.61",
|
|
53
52
|
"@testing-library/react-hooks": "^8.0.1",
|
|
54
53
|
"@types/jest": "^29.5.14",
|
|
55
54
|
"ahooks": "^3.8.4",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { UseCtx } from '../../interface';
|
|
2
|
-
import { InitPlayerWidgetsOptions } from '.';
|
|
3
|
-
type Ctx = ReturnType<UseCtx>;
|
|
4
|
-
/**
|
|
5
|
-
* 多目设备初始化控件
|
|
6
|
-
*/
|
|
7
|
-
export declare function initMultiCameraPlayerWidgets(ctx: Ctx, options: InitPlayerWidgetsOptions): void;
|
|
8
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { FullScreen, MultiPtz, Muted, RecordVideo, Resolution, Screenshot, SmallIntercom, SwitchLayout, VideoBitKBP, TileTip, TileActions, LandscapeTip, MoveablePtzControl, PtzMoveableTip } from '../../widgets';
|
|
2
|
-
import { landscapeTipId, moveablePtzControlId, multiPtzId, ptzMoveableTipId, tileActionsId, tileTipId } from '../../ui/constant';
|
|
3
|
-
import { multiPrefix } from '../../widgets/multiCamera/constants';
|
|
4
|
-
/**
|
|
5
|
-
* 多目设备初始化控件
|
|
6
|
-
*/
|
|
7
|
-
export function initMultiCameraPlayerWidgets(ctx, options) {
|
|
8
|
-
const topRightContent = [{
|
|
9
|
-
id: 'VideoBitKBP',
|
|
10
|
-
content: VideoBitKBP
|
|
11
|
-
}];
|
|
12
|
-
const bottomLeftContent = [{
|
|
13
|
-
id: 'Screenshot',
|
|
14
|
-
content: Screenshot
|
|
15
|
-
}, {
|
|
16
|
-
id: 'RecordVideo',
|
|
17
|
-
content: RecordVideo
|
|
18
|
-
}, {
|
|
19
|
-
id: 'Muted',
|
|
20
|
-
content: Muted
|
|
21
|
-
}, {
|
|
22
|
-
id: 'SmallIntercom',
|
|
23
|
-
content: SmallIntercom
|
|
24
|
-
}, {
|
|
25
|
-
id: multiPtzId,
|
|
26
|
-
content: MultiPtz,
|
|
27
|
-
hidden: true
|
|
28
|
-
}, {
|
|
29
|
-
id: 'Resolution',
|
|
30
|
-
content: Resolution,
|
|
31
|
-
initProps: {
|
|
32
|
-
verticalResolutionCustomClick: options.verticalResolutionCustomClick
|
|
33
|
-
}
|
|
34
|
-
}];
|
|
35
|
-
const bottomRightContent = [{
|
|
36
|
-
id: 'SwitchLayout',
|
|
37
|
-
content: SwitchLayout
|
|
38
|
-
}, {
|
|
39
|
-
id: 'FullScreen',
|
|
40
|
-
content: FullScreen
|
|
41
|
-
}];
|
|
42
|
-
const removeContentById = (content, id) => {
|
|
43
|
-
content.splice(content.findIndex(item => item.id === id), 1);
|
|
44
|
-
};
|
|
45
|
-
options.hideKbsMenu && removeContentById(topRightContent, 'VideoBitKBP');
|
|
46
|
-
options.hideScreenShotMenu && removeContentById(bottomLeftContent, 'Screenshot');
|
|
47
|
-
options.hideRecordVideoMenu && removeContentById(bottomLeftContent, 'RecordVideo');
|
|
48
|
-
options.hideHorizontalMenu && removeContentById(bottomRightContent, 'FullScreen');
|
|
49
|
-
ctx.addContent('topLeft', []);
|
|
50
|
-
ctx.addContent('topRight', topRightContent);
|
|
51
|
-
ctx.addContent('bottomLeft', bottomLeftContent);
|
|
52
|
-
ctx.addContent('bottomRight', bottomRightContent);
|
|
53
|
-
ctx.addContent('absolute', [{
|
|
54
|
-
id: tileTipId,
|
|
55
|
-
content: TileTip,
|
|
56
|
-
absoluteContentClassName: `${multiPrefix}-tile-tip-wrap`,
|
|
57
|
-
hidden: true
|
|
58
|
-
}, {
|
|
59
|
-
id: ptzMoveableTipId,
|
|
60
|
-
content: PtzMoveableTip,
|
|
61
|
-
absoluteContentClassName: `${multiPrefix}-tile-tip-wrap`,
|
|
62
|
-
hidden: true
|
|
63
|
-
}, {
|
|
64
|
-
id: landscapeTipId,
|
|
65
|
-
content: LandscapeTip,
|
|
66
|
-
absoluteContentClassName: `${multiPrefix}-tile-tip-wrap`,
|
|
67
|
-
hidden: true
|
|
68
|
-
}, {
|
|
69
|
-
id: tileActionsId,
|
|
70
|
-
absoluteContentClassName: `${multiPrefix}-actions-wrap`,
|
|
71
|
-
content: TileActions
|
|
72
|
-
}, {
|
|
73
|
-
id: moveablePtzControlId,
|
|
74
|
-
content: MoveablePtzControl,
|
|
75
|
-
absoluteNoCoverView: true,
|
|
76
|
-
hidden: true
|
|
77
|
-
}]);
|
|
78
|
-
}
|