@ray-js/ipc-player-integration 0.0.1-beta-21 → 0.0.1-beta-22
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.js +19 -9
- package/lib/ctx/ctx.d.ts +5 -3
- package/lib/ctx/ctx.js +43 -22
- package/lib/ctx/store.d.ts +1 -1
- package/lib/ctx/store.js +1 -1
- package/lib/i18n/index.d.ts +12 -0
- package/lib/i18n/strings.d.ts +6 -0
- package/lib/i18n/strings.js +8 -2
- package/lib/interface.d.ts +11 -7
- package/lib/plugins/battery/battery.composition.d.ts +47 -5
- package/lib/plugins/battery/battery.composition.js +4 -0
- package/lib/plugins/battery/battery.js +9 -9
- package/lib/plugins/battery/battery.less +4 -14
- package/lib/plugins/battery/batteryFull.d.ts +13 -0
- package/lib/plugins/battery/batteryFull.js +46 -0
- package/lib/plugins/fullScreen/fullScreen.js +11 -7
- package/lib/plugins/fullScreen/fullScreen.less +7 -7
- package/lib/plugins/fullScreen/verticalScreen.d.ts +1 -1
- package/lib/plugins/fullScreen/verticalScreen.js +8 -5
- package/lib/plugins/fullScreen/verticalScreen.less +7 -12
- package/lib/plugins/index.d.ts +3 -1
- package/lib/plugins/index.js +6 -2
- package/lib/plugins/muted/muted.js +4 -4
- package/lib/plugins/muted/muted.less +8 -1
- package/lib/plugins/ptz/ptz.js +5 -21
- package/lib/plugins/ptz/ptz.less +1 -1
- package/lib/plugins/ptz/ptzControl.js +1 -3
- package/lib/plugins/recordVideo/recordVideo.js +8 -7
- package/lib/plugins/recordVideo/recordVideo.less +2 -2
- package/lib/plugins/resolution/fullResolutionControl.js +0 -1
- package/lib/plugins/resolution/resolution.js +6 -3
- package/lib/plugins/resolution/resolution.less +4 -3
- package/lib/plugins/screenshot/screenshot.js +40 -16
- package/lib/plugins/screenshot/screenshot.less +28 -23
- package/lib/plugins/smallIntercom/index.d.ts +1 -0
- package/lib/plugins/smallIntercom/index.js +1 -0
- package/lib/plugins/smallIntercom/smallIntercom.d.ts +6 -0
- package/lib/plugins/smallIntercom/smallIntercom.js +49 -0
- package/lib/plugins/smallIntercom/smallIntercom.less +50 -0
- package/lib/plugins/tempHumidity/tempHumidity.d.ts +1 -1
- package/lib/plugins/tempHumidity/tempHumidity.js +12 -4
- package/lib/plugins/videoBitKBP/index.d.ts +1 -0
- package/lib/plugins/videoBitKBP/index.js +1 -0
- package/lib/plugins/{videoBitKbps/videoBitKbps.d.ts → videoBitKBP/videoBitKBP.d.ts} +2 -2
- package/lib/plugins/{videoBitKbps/videoBitKbps.js → videoBitKBP/videoBitKBP.js} +14 -7
- package/lib/plugins/{videoBitKbps/videoBitKbps.less → videoBitKBP/videoBitKBP.less} +4 -5
- package/lib/ui/bottomLeftContent.d.ts +8 -0
- package/lib/ui/{topContent.js → bottomLeftContent.js} +10 -9
- package/lib/ui/bottomRightContent.d.ts +8 -0
- package/lib/ui/bottomRightContent.js +33 -0
- package/lib/ui/constant.d.ts +1 -0
- package/lib/ui/constant.js +2 -1
- package/lib/ui/hooks.d.ts +1 -1
- package/lib/ui/hooks.js +4 -3
- package/lib/ui/{bottomContent.d.ts → topLeftContent.d.ts} +2 -2
- package/lib/ui/topLeftContent.js +37 -0
- package/lib/ui/{topContent.d.ts → topRightContent.d.ts} +2 -2
- package/lib/ui/{bottomContent.js → topRightContent.js} +10 -9
- package/lib/ui/ui.d.ts +3 -0
- package/lib/ui/ui.js +97 -37
- package/lib/ui/ui.less +162 -25
- package/package.json +6 -8
- package/lib/plugins/videoBitKbps/index.d.ts +0 -1
- package/lib/plugins/videoBitKbps/index.js +0 -1
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
.ipc-player-plugin-vertical-screen {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.ipc-player-plugin-vertical-screen-icon {
|
|
9
|
-
// font-size: var(--iconFontSize);
|
|
10
|
-
font-size: calc(var(--iconFontSize) * var(--ipc-player-size-scale, 1));
|
|
11
|
-
color: var(--iconColor);
|
|
12
|
-
}
|
|
1
|
+
.ipc-player-plugin-vertical-screen-wrap {
|
|
2
|
+
background-color: red;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ipc-player-plugin-vertical-screen-icon {
|
|
6
|
+
color: var(--iconColor);
|
|
7
|
+
font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
|
|
13
8
|
}
|
package/lib/plugins/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from './battery';
|
|
2
|
+
export * from './battery/batteryFull';
|
|
2
3
|
export * from './screenshot';
|
|
3
4
|
export * from './tempHumidity';
|
|
4
5
|
export * from './recordVideo';
|
|
5
6
|
export * from './fullScreen';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './videoBitKBP';
|
|
7
8
|
export * from './voiceIntercom';
|
|
8
9
|
export * from './muted';
|
|
9
10
|
export * from './ptz';
|
|
10
11
|
export * from './resolution';
|
|
12
|
+
export * from './smallIntercom';
|
package/lib/plugins/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
// 非全屏电池插件
|
|
1
2
|
export * from './battery';
|
|
3
|
+
// 全屏电池插件
|
|
4
|
+
export * from './battery/batteryFull';
|
|
2
5
|
export * from './screenshot';
|
|
3
6
|
export * from './tempHumidity';
|
|
4
7
|
export * from './recordVideo';
|
|
5
8
|
export * from './fullScreen';
|
|
6
|
-
export * from './
|
|
9
|
+
export * from './videoBitKBP';
|
|
7
10
|
export * from './voiceIntercom';
|
|
8
11
|
export * from './muted';
|
|
9
12
|
export * from './ptz';
|
|
10
|
-
export * from './resolution';
|
|
13
|
+
export * from './resolution';
|
|
14
|
+
export * from './smallIntercom';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { View, Text } from '@ray-js/ray';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import { useStore } from '../../ctx/store';
|
|
4
5
|
import './muted.less';
|
|
5
6
|
export const Muted = props => {
|
|
6
7
|
const {
|
|
7
8
|
mute,
|
|
8
|
-
setMute
|
|
9
|
+
setMute,
|
|
10
|
+
className
|
|
9
11
|
} = props;
|
|
10
12
|
const {
|
|
11
13
|
isMuted
|
|
@@ -13,6 +15,7 @@ export const Muted = props => {
|
|
|
13
15
|
isMuted: mute
|
|
14
16
|
});
|
|
15
17
|
return /*#__PURE__*/React.createElement(View, {
|
|
18
|
+
className: clsx(className),
|
|
16
19
|
onClick: () => {
|
|
17
20
|
// IPCPlayerContext.setMuted({
|
|
18
21
|
// mute: !isMuted,
|
|
@@ -24,9 +27,6 @@ export const Muted = props => {
|
|
|
24
27
|
// },
|
|
25
28
|
// });
|
|
26
29
|
setMute(!isMuted);
|
|
27
|
-
},
|
|
28
|
-
style: {
|
|
29
|
-
display: 'flex'
|
|
30
30
|
}
|
|
31
31
|
}, isMuted ? /*#__PURE__*/React.createElement(Text, {
|
|
32
32
|
className: "ipc-player-plugin-muted-text-icon icon-panel icon-panel-mute-off"
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
.muteIconBox {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
width: calc(var(--iconBoxSize) * var(--ipc-player-size-scale, 1));
|
|
6
|
+
height: calc(var(--iconBoxSize) * var(--ipc-player-size-scale, 1));
|
|
7
|
+
}
|
|
1
8
|
.ipc-player-plugin-muted-text-icon {
|
|
2
9
|
color: var(--iconColor);
|
|
3
|
-
font-size: calc(var(--
|
|
10
|
+
font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
|
|
4
11
|
}
|
package/lib/plugins/ptz/ptz.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { View, Text } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import React
|
|
4
|
+
import React from 'react';
|
|
5
5
|
import { useStore, updateAtom } from '../../ctx/store';
|
|
6
6
|
import { ptzControlId } from '../../ui/constant';
|
|
7
7
|
import './ptz.less';
|
|
@@ -12,7 +12,8 @@ export const Ptz = props => {
|
|
|
12
12
|
screenType: screenTypeAtom,
|
|
13
13
|
ptzActive,
|
|
14
14
|
addContent,
|
|
15
|
-
deleteContent
|
|
15
|
+
deleteContent,
|
|
16
|
+
className
|
|
16
17
|
} = props;
|
|
17
18
|
const {
|
|
18
19
|
screenType,
|
|
@@ -21,25 +22,11 @@ export const Ptz = props => {
|
|
|
21
22
|
screenType: screenTypeAtom,
|
|
22
23
|
isPtzActive: ptzActive
|
|
23
24
|
});
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
// init();
|
|
26
|
-
}, []);
|
|
27
|
-
|
|
28
|
-
// const init = () => {
|
|
29
|
-
// IPCPlayerContext.isMuted({
|
|
30
|
-
// success: res => {
|
|
31
|
-
// setIsMuted(res);
|
|
32
|
-
// },
|
|
33
|
-
// fail: res => {
|
|
34
|
-
// console.log('res===isMuted err', res);
|
|
35
|
-
// },
|
|
36
|
-
// });
|
|
37
|
-
// };
|
|
38
|
-
|
|
39
25
|
if (screenType === 'vertical') {
|
|
40
26
|
return null;
|
|
41
27
|
}
|
|
42
28
|
return /*#__PURE__*/React.createElement(View, {
|
|
29
|
+
className: clsx(className),
|
|
43
30
|
onClick: () => {
|
|
44
31
|
if (!isPtzActive) {
|
|
45
32
|
// 添加ptz空间
|
|
@@ -57,11 +44,8 @@ export const Ptz = props => {
|
|
|
57
44
|
deleteContent('absolute', ptzControlId);
|
|
58
45
|
}
|
|
59
46
|
updateAtom(ptzActive, !isPtzActive);
|
|
60
|
-
},
|
|
61
|
-
style: {
|
|
62
|
-
display: 'flex'
|
|
63
47
|
}
|
|
64
48
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
65
|
-
className: clsx('
|
|
49
|
+
className: clsx('icon-panel', 'icon-panel-ptz', 'ipc-player-plugin-ptz-text-icon', isPtzActive && 'ipc-ptz-active')
|
|
66
50
|
}));
|
|
67
51
|
};
|
package/lib/plugins/ptz/ptz.less
CHANGED
|
@@ -51,12 +51,10 @@ export const PtzControl = props => {
|
|
|
51
51
|
dpValue: '4',
|
|
52
52
|
icon: 'ptz-arrow'
|
|
53
53
|
}],
|
|
54
|
-
onTouchPtzStart:
|
|
55
|
-
console.log(data, 'data');
|
|
54
|
+
onTouchPtzStart: () => {
|
|
56
55
|
event.emit(pauseTimeToHideAllComponent);
|
|
57
56
|
},
|
|
58
57
|
onTouchPtzEnd: () => {
|
|
59
|
-
console.log('dsads');
|
|
60
58
|
event.emit(startTimeToHideAllComponent);
|
|
61
59
|
},
|
|
62
60
|
brandColor: brandColor,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, useContext } from 'react';
|
|
2
|
-
import { View } from '@ray-js/ray';
|
|
2
|
+
import { View, Text } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { UIEventContext } from '../../ui/context';
|
|
5
5
|
import { startTimeToHideAllComponent, pauseTimeToHideAllComponent } from '../../ui/constant';
|
|
@@ -70,11 +70,10 @@ export function RecordVideo(props) {
|
|
|
70
70
|
} = useContext(UIEventContext);
|
|
71
71
|
const {
|
|
72
72
|
addContent,
|
|
73
|
-
deleteContent
|
|
74
|
-
} = props;
|
|
75
|
-
const {
|
|
73
|
+
deleteContent,
|
|
76
74
|
recording: recordingAtom,
|
|
77
|
-
setRecording
|
|
75
|
+
setRecording,
|
|
76
|
+
className
|
|
78
77
|
} = props;
|
|
79
78
|
const {
|
|
80
79
|
recording
|
|
@@ -107,9 +106,11 @@ export function RecordVideo(props) {
|
|
|
107
106
|
};
|
|
108
107
|
return /*#__PURE__*/React.createElement(View, {
|
|
109
108
|
onClick: () => handRecordVideo(),
|
|
110
|
-
className: clsx(
|
|
109
|
+
className: clsx(className, '')
|
|
110
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
111
|
+
className: clsx('icon-panel', 'ipc-player-plugin-record-video-icon', recording ? 'icon-panel-record-stop' : 'icon-panel-record'),
|
|
111
112
|
style: {
|
|
112
113
|
color: recording ? 'rgba(255, 56, 56, 1)' : undefined
|
|
113
114
|
}
|
|
114
|
-
});
|
|
115
|
+
}));
|
|
115
116
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.ipc-player-plugin-record-video-icon {
|
|
2
|
-
font-size: calc(var(--
|
|
2
|
+
font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
|
|
3
3
|
color: var(--iconColor);
|
|
4
4
|
}
|
|
5
5
|
.ipc-player-plugin-record-video-toast-wrap {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
padding: calc(12px * var(--ipc-player-size-scale, 1));
|
|
15
15
|
align-items: center;
|
|
16
|
-
background-color: var(--bg-color);
|
|
16
|
+
background-color: var(--shot-card-bg-color);
|
|
17
17
|
border-radius: calc(8px * var(--ipc-player-size-scale, 1));
|
|
18
18
|
// background-color: #fff;
|
|
19
19
|
background: linear-gradient(0deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)), #000000;
|
|
@@ -13,7 +13,8 @@ export const Resolution = props => {
|
|
|
13
13
|
IPCPlayerContext,
|
|
14
14
|
setResolution,
|
|
15
15
|
addContent,
|
|
16
|
-
setFullResolutionActive
|
|
16
|
+
setFullResolutionActive,
|
|
17
|
+
className
|
|
17
18
|
} = props;
|
|
18
19
|
const {
|
|
19
20
|
resolution,
|
|
@@ -45,8 +46,10 @@ export const Resolution = props => {
|
|
|
45
46
|
setResolution(resolution === 'HD' ? 'SD' : 'HD');
|
|
46
47
|
return true;
|
|
47
48
|
},
|
|
48
|
-
className: clsx(
|
|
49
|
+
className: clsx(className, screenType === 'vertical' ? 'ipc-player-plugin-resolution-vertical' : 'ipc-player-plugin-resolution-full')
|
|
50
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
51
|
+
className: "ipc-player-plugin-resolution"
|
|
49
52
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
50
53
|
className: "resolutionText"
|
|
51
|
-
}, Strings.getLang(`ipc_player_resolution_${resolution}`)));
|
|
54
|
+
}, Strings.getLang(`ipc_player_resolution_${resolution}`))));
|
|
52
55
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
.ipc-player-plugin-resolution {
|
|
2
2
|
background-color: rgba(255,255,255,0.2);
|
|
3
|
-
padding: calc(
|
|
3
|
+
padding: calc(4px * var(--ipc-player-size-scale, 1)) calc(5px * var(--ipc-player-size-scale, 1)) !important;
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
align-items: center;
|
|
7
7
|
border-radius: calc(8px * var(--ipc-player-size-scale, 1));
|
|
8
|
-
|
|
8
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
9
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
9
10
|
.resolutionText {
|
|
10
11
|
color: var(--iconColor);
|
|
11
12
|
font-weight: 600;
|
|
12
|
-
font-size: calc(
|
|
13
|
+
font-size: calc(14px * var(--ipc-player-size-scale, 1));
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import { View, Image } from '@ray-js/ray';
|
|
2
|
+
import { View, Image, Text } from '@ray-js/ray';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import IpcUtils from '@ray-js/ray-ipc-utils';
|
|
5
|
+
import Strings from '@/i18n';
|
|
6
|
+
import { useStore } from '../../ctx/store';
|
|
4
7
|
import './screenshot.less';
|
|
5
8
|
const CLOSE_TIME = 5000;
|
|
6
9
|
export function Screenshot(props) {
|
|
@@ -10,15 +13,23 @@ export function Screenshot(props) {
|
|
|
10
13
|
saveToAlbum,
|
|
11
14
|
deleteContent,
|
|
12
15
|
devId,
|
|
13
|
-
toast
|
|
16
|
+
toast,
|
|
17
|
+
className
|
|
14
18
|
} = props;
|
|
15
|
-
const
|
|
19
|
+
const {
|
|
20
|
+
screenType,
|
|
21
|
+
brandColor
|
|
22
|
+
} = useStore({
|
|
23
|
+
screenType: props.screenType,
|
|
24
|
+
brandColor: props.brandColor
|
|
25
|
+
});
|
|
26
|
+
useRef();
|
|
16
27
|
const timeToCloseToast = () => {
|
|
17
|
-
clearInterval(timer.current);
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
timer.current = setTimeout(() => {
|
|
20
|
-
|
|
21
|
-
}, CLOSE_TIME);
|
|
28
|
+
// clearInterval(timer.current);
|
|
29
|
+
// // @ts-ignore
|
|
30
|
+
// timer.current = setTimeout(() => {
|
|
31
|
+
// deleteContent('absolute', 'plugin-screenshot-toast');
|
|
32
|
+
// }, CLOSE_TIME);
|
|
22
33
|
};
|
|
23
34
|
const handCheck = () => {
|
|
24
35
|
IpcUtils.goToIpcPageNativeRoute('ipc_album_panel', devId);
|
|
@@ -27,24 +38,36 @@ export function Screenshot(props) {
|
|
|
27
38
|
deleteContent('absolute', 'plugin-screenshot-toast');
|
|
28
39
|
addContent('absolute', {
|
|
29
40
|
id: 'plugin-screenshot-toast',
|
|
30
|
-
absoluteContentClassName: 'ipc-player-plugin-screenshot-toast-
|
|
41
|
+
absoluteContentClassName: 'ipc-player-plugin-screenshot-toast-wrap',
|
|
42
|
+
absolutePosition: {
|
|
43
|
+
top: screenType === 'vertical' ? '12px' : '60px',
|
|
44
|
+
left: screenType === 'vertical' ? '16px' : '50%',
|
|
45
|
+
right: screenType === 'vertical' ? '16px' : '50%'
|
|
46
|
+
},
|
|
31
47
|
content: () => {
|
|
32
48
|
return /*#__PURE__*/React.createElement(View, {
|
|
33
49
|
className: "ipc-player-plugin-screenshot-toast"
|
|
50
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
51
|
+
className: "ipc-player-plugin-screenshot-toast-image-box"
|
|
34
52
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
35
53
|
className: "ipc-player-plugin-screenshot-toast-image",
|
|
36
54
|
src: str
|
|
37
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
55
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
38
56
|
className: "ipc-player-plugin-screenshot-toast-title"
|
|
39
|
-
},
|
|
57
|
+
}, Strings.getLang('ipc_player_screenshot_success_tip')), /*#__PURE__*/React.createElement(View, {
|
|
40
58
|
onClick: handCheck,
|
|
41
|
-
className: "ipc-player-plugin-screenshot-toast-bottom"
|
|
42
|
-
|
|
59
|
+
className: "ipc-player-plugin-screenshot-toast-bottom",
|
|
60
|
+
style: {
|
|
61
|
+
color: brandColor,
|
|
62
|
+
borderColor: brandColor
|
|
63
|
+
}
|
|
64
|
+
}, Strings.getLang('ipc_player_shot_or_record_check')));
|
|
43
65
|
}
|
|
44
66
|
});
|
|
45
67
|
timeToCloseToast();
|
|
46
68
|
};
|
|
47
|
-
return /*#__PURE__*/React.createElement(
|
|
69
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
70
|
+
className: clsx(className),
|
|
48
71
|
onClick: () => {
|
|
49
72
|
console.log('截屏!!!');
|
|
50
73
|
IPCPlayerContext.snapshot({
|
|
@@ -61,7 +84,8 @@ export function Screenshot(props) {
|
|
|
61
84
|
});
|
|
62
85
|
}
|
|
63
86
|
});
|
|
64
|
-
}
|
|
65
|
-
|
|
87
|
+
}
|
|
88
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
89
|
+
className: clsx('icon-panel', 'icon-panel-screenshot', 'ipc-player-plugin-screenshot-icon')
|
|
66
90
|
}));
|
|
67
91
|
}
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
.ipc-player-plugin-screenshot-icon {
|
|
2
2
|
color: var(--iconColor);
|
|
3
|
-
font-size: calc(var(--
|
|
3
|
+
font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
|
|
4
4
|
}
|
|
5
|
-
.ipc-player-plugin-screenshot-toast-
|
|
5
|
+
.ipc-player-plugin-screenshot-toast-wrap {
|
|
6
6
|
position: absolute;
|
|
7
|
-
width:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
top: calc(16px * var(--ipc-player-size-scale, 1));
|
|
7
|
+
// max-width: 300px;
|
|
8
|
+
// left: 50%;
|
|
9
|
+
// transform: translateX(-50%);
|
|
10
|
+
// top: calc(16px * var(--ipc-player-size-scale, 1));
|
|
12
11
|
}
|
|
13
12
|
.ipc-player-plugin-screenshot-toast {
|
|
14
13
|
border-radius: calc(8px * var(--ipc-player-size-scale, 1));;
|
|
15
|
-
background-color: var(--bg-color);
|
|
14
|
+
background-color: var(--shot-card-bg-color);
|
|
16
15
|
display: flex;
|
|
17
16
|
align-items: center;
|
|
18
|
-
padding: calc(8px * var(--ipc-player-size-scale, 1)) calc(
|
|
19
|
-
z-index:
|
|
20
|
-
.ipc-player-plugin-screenshot-toast-image {
|
|
21
|
-
width: calc(66px * var(--ipc-player-size-scale, 1));
|
|
22
|
-
height: calc(37px * var(--ipc-player-size-scale, 1));
|
|
17
|
+
padding: calc(8px * var(--ipc-player-size-scale, 1)) calc(12px * var(--ipc-player-size-scale, 1));
|
|
18
|
+
z-index: 100;
|
|
19
|
+
.ipc-player-plugin-screenshot-toast-image-box {
|
|
23
20
|
border-radius: calc(4px * var(--ipc-player-size-scale, 1));
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
width: calc(66px * var(--ipc-player-size-scale, 1));
|
|
23
|
+
height: calc(66px * 0.57 * var(--ipc-player-size-scale, 1));
|
|
24
|
+
}
|
|
25
|
+
.ipc-player-plugin-screenshot-toast-image {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
object-fit: cover;
|
|
24
29
|
}
|
|
25
30
|
.ipc-player-plugin-screenshot-toast-title {
|
|
31
|
+
flex: 1;
|
|
26
32
|
margin-left: calc(12px * var(--ipc-player-size-scale, 1));
|
|
27
33
|
font-size: calc(14px * var(--ipc-player-size-scale, 1));
|
|
28
34
|
color: var(--fontColor);
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
margin-right: calc(12px * var(--ipc-player-size-scale, 1));
|
|
36
|
+
word-break: break-word;
|
|
37
|
+
|
|
31
38
|
}
|
|
32
39
|
.ipc-player-plugin-screenshot-toast-bottom {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border: 1rpx solid #1989FA;
|
|
37
|
-
// border-radius: 8rpx;
|
|
40
|
+
border: 1px solid #1989FA;
|
|
41
|
+
min-width: calc(52px * var(--ipc-player-size-scale, 1));
|
|
42
|
+
max-width: calc(100px * var(--ipc-player-size-scale, 1));
|
|
38
43
|
border-radius: calc(4px * var(--ipc-player-size-scale, 1));
|
|
39
|
-
// padding: 10rpx 22rpx;
|
|
40
44
|
padding: calc(5px * var(--ipc-player-size-scale, 1)) calc(11px * var(--ipc-player-size-scale, 1));
|
|
41
|
-
color: #1989FA;
|
|
42
|
-
// font-size: 28rpx;
|
|
43
45
|
font-size: calc(14px * var(--ipc-player-size-scale, 1));
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
text-overflow: ellipsis;
|
|
44
49
|
}
|
|
45
50
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './smallIntercom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './smallIntercom';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text } from '@ray-js/ray';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useStore } from '../../ctx/store';
|
|
5
|
+
import './smallIntercom.less';
|
|
6
|
+
export function SmallIntercom(props) {
|
|
7
|
+
const {
|
|
8
|
+
IPCPlayerContext,
|
|
9
|
+
addContent,
|
|
10
|
+
saveToAlbum,
|
|
11
|
+
deleteContent,
|
|
12
|
+
devId,
|
|
13
|
+
toast,
|
|
14
|
+
className
|
|
15
|
+
} = props;
|
|
16
|
+
const {
|
|
17
|
+
screenType,
|
|
18
|
+
ptzActive
|
|
19
|
+
} = useStore({
|
|
20
|
+
screenType: props.screenType,
|
|
21
|
+
ptzActive: props.ptzActive
|
|
22
|
+
});
|
|
23
|
+
const handClick = () => {
|
|
24
|
+
console.log('截屏!!!');
|
|
25
|
+
// IPCPlayerContext.snapshot({
|
|
26
|
+
// saveToAlbum, // 保存到 IPC 相册
|
|
27
|
+
// success: res => {
|
|
28
|
+
// showToast(res.tempImagePath);
|
|
29
|
+
// },
|
|
30
|
+
// fail: err => {
|
|
31
|
+
// const errObj = err.innerError || err || {};
|
|
32
|
+
// const errMsg = errObj.errorMsg || I18n.t('error_screenshot');
|
|
33
|
+
// toast({ title: errMsg });
|
|
34
|
+
// },
|
|
35
|
+
// });
|
|
36
|
+
};
|
|
37
|
+
if (screenType === 'vertical' && !ptzActive) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
if (screenType === 'full' && ptzActive) {
|
|
41
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
42
|
+
className: clsx(className),
|
|
43
|
+
onClick: handClick
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
45
|
+
className: clsx('icon-panel', 'icon-panel-one-way-intercom', 'ipc-player-plugin-small-intercom-icon')
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.ipc-player-plugin-small-intercom-icon {
|
|
2
|
+
color: var(--iconColor);
|
|
3
|
+
font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
|
|
4
|
+
}
|
|
5
|
+
.ipc-player-plugin-screenshot-toast-wrap {
|
|
6
|
+
position: absolute;
|
|
7
|
+
// max-width: 300px;
|
|
8
|
+
// left: 50%;
|
|
9
|
+
// transform: translateX(-50%);
|
|
10
|
+
// top: calc(16px * var(--ipc-player-size-scale, 1));
|
|
11
|
+
}
|
|
12
|
+
.ipc-player-plugin-screenshot-toast {
|
|
13
|
+
border-radius: calc(8px * var(--ipc-player-size-scale, 1));;
|
|
14
|
+
background-color: var(--shot-card-bg-color);
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding: calc(8px * var(--ipc-player-size-scale, 1)) calc(12px * var(--ipc-player-size-scale, 1));
|
|
18
|
+
z-index: 100;
|
|
19
|
+
.ipc-player-plugin-screenshot-toast-image-box {
|
|
20
|
+
border-radius: calc(4px * var(--ipc-player-size-scale, 1));
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
width: calc(66px * var(--ipc-player-size-scale, 1));
|
|
23
|
+
height: calc(66px * 0.57 * var(--ipc-player-size-scale, 1));
|
|
24
|
+
}
|
|
25
|
+
.ipc-player-plugin-screenshot-toast-image {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
object-fit: cover;
|
|
29
|
+
}
|
|
30
|
+
.ipc-player-plugin-screenshot-toast-title {
|
|
31
|
+
flex: 1;
|
|
32
|
+
margin-left: calc(12px * var(--ipc-player-size-scale, 1));
|
|
33
|
+
font-size: calc(14px * var(--ipc-player-size-scale, 1));
|
|
34
|
+
color: var(--fontColor);
|
|
35
|
+
margin-right: calc(12px * var(--ipc-player-size-scale, 1));
|
|
36
|
+
word-break: break-word;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
.ipc-player-plugin-screenshot-toast-bottom {
|
|
40
|
+
border: 1px solid #1989FA;
|
|
41
|
+
min-width: calc(52px * var(--ipc-player-size-scale, 1));
|
|
42
|
+
max-width: calc(100px * var(--ipc-player-size-scale, 1));
|
|
43
|
+
border-radius: calc(4px * var(--ipc-player-size-scale, 1));
|
|
44
|
+
padding: calc(5px * var(--ipc-player-size-scale, 1)) calc(11px * var(--ipc-player-size-scale, 1));
|
|
45
|
+
font-size: calc(14px * var(--ipc-player-size-scale, 1));
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -4,5 +4,5 @@ import './tempHumidity.less';
|
|
|
4
4
|
interface IProp extends ComponentConfigProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const TempHumidity: (props: IProp) => React.JSX.Element;
|
|
7
|
+
export declare const TempHumidity: (props: IProp) => React.JSX.Element | null;
|
|
8
8
|
export {};
|
|
@@ -27,7 +27,7 @@ export const TempHumidity = props => {
|
|
|
27
27
|
className: "ipc-player-plugin-tempHumidity-text-icon icon-panel icon-panel-temperature"
|
|
28
28
|
}), /*#__PURE__*/React.createElement(Text, null, tempC));
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return null;
|
|
31
31
|
};
|
|
32
32
|
const humRender = () => {
|
|
33
33
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
@@ -36,8 +36,16 @@ export const TempHumidity = props => {
|
|
|
36
36
|
className: "tempHumidity"
|
|
37
37
|
}, `${humidity}`));
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
console.log(tempC, tempF, humidity);
|
|
40
|
+
|
|
41
|
+
// 当无值时返回null
|
|
42
|
+
if (!tempC && !tempF && !humidity) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
46
|
+
className: clsx(className)
|
|
47
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
48
|
+
className: clsx('ipc-player-plugin-tempHumidity')
|
|
41
49
|
}, (() => {
|
|
42
50
|
if ((tempC || tempUnit === '1' && tempF) && humidity) {
|
|
43
51
|
return /*#__PURE__*/React.createElement(React.Fragment, null, tempRender(), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -50,6 +58,6 @@ export const TempHumidity = props => {
|
|
|
50
58
|
if (humidity) {
|
|
51
59
|
return /*#__PURE__*/React.createElement(React.Fragment, null, humRender());
|
|
52
60
|
}
|
|
53
|
-
return
|
|
61
|
+
return null;
|
|
54
62
|
})()));
|
|
55
63
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './videoBitKBP';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './videoBitKBP';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './videoBitKbps.less';
|
|
3
2
|
import { ComponentConfigProps } from '../../interface';
|
|
3
|
+
import './videoBitKBP.less';
|
|
4
4
|
type Props = ComponentConfigProps;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const VideoBitKBP: (props: Props) => React.JSX.Element | null;
|
|
6
6
|
export {};
|