@ray-js/ipc-player-integration 0.0.1-beta-42 → 0.0.1-beta-44
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 +0 -1
- package/lib/plugins/fullScreen/fullScreen.d.ts +1 -0
- package/lib/plugins/fullScreen/fullScreen.js +3 -2
- package/lib/plugins/recordVideo/recordVideo.js +20 -12
- package/lib/ui/ui.js +22 -7
- package/lib/utils/plugins/index.d.ts +1 -0
- package/lib/utils/plugins/index.js +8 -1
- package/package.json +3 -3
package/lib/ctx/ctx.js
CHANGED
|
@@ -3,6 +3,7 @@ import './fullScreen.less';
|
|
|
3
3
|
import type { ComponentConfigProps } from '../../interface';
|
|
4
4
|
type Props = ComponentConfigProps & {
|
|
5
5
|
className?: string;
|
|
6
|
+
hideHorizontalMenu?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare function FullScreen(props: Props): React.JSX.Element | null;
|
|
8
9
|
export {};
|
|
@@ -21,7 +21,8 @@ export function FullScreen(props) {
|
|
|
21
21
|
deleteContent,
|
|
22
22
|
className,
|
|
23
23
|
showContent,
|
|
24
|
-
devId
|
|
24
|
+
devId,
|
|
25
|
+
hideHorizontalMenu
|
|
25
26
|
} = props;
|
|
26
27
|
const {
|
|
27
28
|
screenType
|
|
@@ -120,7 +121,7 @@ export function FullScreen(props) {
|
|
|
120
121
|
}
|
|
121
122
|
});
|
|
122
123
|
};
|
|
123
|
-
if (screenType === 'full') return null;
|
|
124
|
+
if (screenType === 'full' || hideHorizontalMenu) return null;
|
|
124
125
|
return /*#__PURE__*/React.createElement(View, {
|
|
125
126
|
className: clsx(className),
|
|
126
127
|
onClick: () => handClick('full')
|
|
@@ -221,19 +221,27 @@ export function RecordVideo(props) {
|
|
|
221
221
|
showShot: false
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
224
|
+
try {
|
|
225
|
+
const recordInfo = await setRecording(target);
|
|
226
|
+
console.log(recordInfo, 'recordInfo====');
|
|
227
|
+
if (target) {
|
|
228
|
+
setRecordingDisabled(true);
|
|
229
|
+
setState({
|
|
230
|
+
showTimer: true
|
|
231
|
+
});
|
|
232
|
+
/** 录制开始后3秒后才可结束 */
|
|
233
|
+
timeToResetRecordDisabled();
|
|
234
|
+
} else {
|
|
235
|
+
setState({
|
|
236
|
+
showTimer: false,
|
|
237
|
+
showShot: true,
|
|
238
|
+
shotUrl: recordInfo.tempImagePath
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
} catch (err) {
|
|
242
|
+
console.log('录制失败', err);
|
|
233
243
|
setState({
|
|
234
|
-
showTimer: false
|
|
235
|
-
showShot: true,
|
|
236
|
-
shotUrl: recordInfo.tempImagePath
|
|
244
|
+
showTimer: false
|
|
237
245
|
});
|
|
238
246
|
}
|
|
239
247
|
return true;
|
package/lib/ui/ui.js
CHANGED
|
@@ -83,11 +83,24 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
83
83
|
* 监听屏幕布局变化
|
|
84
84
|
*/
|
|
85
85
|
usePageEvent('onResize', sizeData => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
try {
|
|
87
|
+
const {
|
|
88
|
+
type
|
|
89
|
+
} = sizeData;
|
|
90
|
+
console.log('监听到屏幕布局变化', type);
|
|
91
|
+
const {
|
|
92
|
+
platform,
|
|
93
|
+
deviceType
|
|
94
|
+
} = systemInfo.current;
|
|
95
|
+
// 针对pad 暂不支持横屏,且在ios pad模式下 会触发onResize事件, 待解决
|
|
96
|
+
if (deviceType === 'pad') {
|
|
97
|
+
setScreenType('vertical');
|
|
98
|
+
} else {
|
|
99
|
+
setScreenType(type === 'landscape' ? 'full' : 'vertical');
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
console.log(err, 'err');
|
|
103
|
+
}
|
|
91
104
|
});
|
|
92
105
|
const systemInfo = useRef(null);
|
|
93
106
|
if (!systemInfo.current) {
|
|
@@ -234,7 +247,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
234
247
|
};
|
|
235
248
|
}, []);
|
|
236
249
|
const playerReady = playState === PlayState.PLAYING;
|
|
237
|
-
console.log('brandColor', 'brandColor');
|
|
238
250
|
return /*#__PURE__*/React.createElement(UIEventContext.Provider, {
|
|
239
251
|
value: {
|
|
240
252
|
event: eventRef.current,
|
|
@@ -288,7 +300,10 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
288
300
|
onCameraNotifyWeakNetwork: data => {
|
|
289
301
|
console.log(`onCameraNotifyWeakNetwork: ${JSON.stringify(data)}`);
|
|
290
302
|
},
|
|
291
|
-
clarity: resolution === 'HD' ? 'hd' : 'normal'
|
|
303
|
+
clarity: resolution === 'HD' ? 'hd' : 'normal'
|
|
304
|
+
// 安卓横屏问题
|
|
305
|
+
,
|
|
306
|
+
ptzControllable: screenType === 'vertical',
|
|
292
307
|
privateState: privateState,
|
|
293
308
|
onPlayerTap: data => {
|
|
294
309
|
if (disablePlayerTap.current) {
|
|
@@ -14,7 +14,14 @@ export async function initPlayerPlugins(ctx, options) {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
ctx.addContent('bottomLeft', newDefaultBottomLeftContent);
|
|
17
|
-
|
|
17
|
+
const newDefaultBottomRightContent = _cloneDeep(defaultBottomRightContent);
|
|
18
|
+
const fullScreenIndex = newDefaultBottomRightContent.findIndex(item => item.id === 'FullScreen');
|
|
19
|
+
if (fullScreenIndex !== -1) {
|
|
20
|
+
newDefaultBottomRightContent[fullScreenIndex].initProps = {
|
|
21
|
+
hideHorizontalMenu: options.hideHorizontalMenu
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
ctx.addContent('bottomRight', newDefaultBottomRightContent);
|
|
18
25
|
|
|
19
26
|
// 根据 ipc_manual_petting 是否存在,决定是否要插入控件 moveInteractiveControl
|
|
20
27
|
hasDpCode(ctx.devId, 'ipc_manual_petting').then(res => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ipc-player-integration",
|
|
3
|
-
"version": "0.0.1-beta-
|
|
3
|
+
"version": "0.0.1-beta-44",
|
|
4
4
|
"description": "IPC 播放器功能集成",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ray-js/ipc-ptz-zoom": "0.0.2-beta-7",
|
|
40
40
|
"@ray-js/panel-sdk": "^1.13.1",
|
|
41
|
-
"@ray-js/ray-ipc-player": "2.0.20-beta-
|
|
42
|
-
"@ray-js/ray-ipc-utils": "1.1.0-beta-
|
|
41
|
+
"@ray-js/ray-ipc-player": "2.0.20-beta-10",
|
|
42
|
+
"@ray-js/ray-ipc-utils": "1.1.0-beta-15",
|
|
43
43
|
"@ray-js/svg": "0.2.0",
|
|
44
44
|
"clsx": "^1.2.1",
|
|
45
45
|
"jotai": "^2.10.2"
|