@ray-js/ipc-player-integration 0.0.65-beta.3 → 0.0.66-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 -46
- 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 -17
- 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.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/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 +119 -55
- package/lib/ui/bottomRightContent.js +6 -3
- package/lib/ui/scrollHintArrow.d.ts +23 -0
- package/lib/ui/scrollHintArrow.js +82 -0
- package/lib/ui/ui.d.ts +5 -0
- package/lib/ui/ui.js +89 -98
- 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/floodlight/floodlight.js +2 -1
- package/lib/widgets/flowLowTip/flowLowTip.js +2 -1
- package/lib/widgets/fullScreen/fullScreen.js +2 -1
- 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 +12 -3
- package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.less +24 -4
- package/lib/widgets/multiCamera/index.less +0 -1
- package/lib/widgets/multiCamera/landscapeTip.js +2 -1
- package/lib/widgets/multiCamera/moveablePtzControl.js +5 -5
- package/lib/widgets/multiCamera/multiPtz.js +3 -2
- package/lib/widgets/multiCamera/ptzMoveableTip.js +2 -1
- 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 +2 -1
- 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 +1 -1
- package/lib/widgets/ptzControlTip/ptzControlTip.js +6 -3
- package/lib/widgets/ptzControlTip/ptzControlTip.less +6 -0
- package/lib/widgets/realTimeMagnification/realTimeMagnification.js +2 -1
- package/lib/widgets/recordVideo/recordVideo.js +53 -53
- package/lib/widgets/recordVideo/recordVideo.less +74 -17
- package/lib/widgets/recordVideo/recordVideo.test.js +0 -1
- package/lib/widgets/resolution/fullResolutionControl.js +29 -19
- package/lib/widgets/resolution/resolution.js +3 -2
- package/lib/widgets/screenshot/screenshot.js +45 -66
- package/lib/widgets/screenshot/screenshot.less +40 -1
- 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 +2 -13
- 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 +2 -0
- package/lib/widgets/zoomTurntable/zoomTurntableDock.js +1 -1
- package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +31 -18
- package/lib/widgets/zoomTurntable/zoomTurntableTip.js +23 -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 -14
- package/lib/utils/captureResult.js +0 -70
- package/lib/utils/captureResult.test.d.ts +0 -1
- package/lib/utils/captureResult.test.js +0 -117
- 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 -80
- 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
- package/lib/widgets/screenshot/screenshot.test.d.ts +0 -1
- package/lib/widgets/screenshot/screenshot.test.js +0 -120
package/lib/ui/ui.js
CHANGED
|
@@ -12,25 +12,27 @@ import clsx from 'clsx';
|
|
|
12
12
|
import IPCPlayer from '@ray-js/ray-ipc-player';
|
|
13
13
|
import { ipcTTTOperatorLog } from '@ray-js/ray-ipc-utils';
|
|
14
14
|
import { ClarityType } from '@ray-js/ray-ipc-utils/lib/interface';
|
|
15
|
+
import { PlayerRenderModeContext, PlayerControlVisibilityContext } from '../renderer/context';
|
|
16
|
+
import lynxStyles from '../renderer/index.module.less';
|
|
17
|
+
import { getPlayerViewport } from '../renderer/viewport';
|
|
18
|
+
import { LynxPlayerAdaptersContext } from '../renderer/capabilities';
|
|
15
19
|
import { PlayState, PlayerStreamStatus, MultiCameraScreenMode } from '../interface';
|
|
16
20
|
import { useCtx } from '../ctx/ctx.composition';
|
|
17
|
-
import { useStore, updateAtom } from '../ctx/store';
|
|
21
|
+
import { useStore, updateAtom, getDefaultStore } from '../ctx/store';
|
|
18
22
|
import { UIEventContext } from './context';
|
|
19
|
-
import { showAllComponent, hideAllComponent, playerTap, startTimeToHideAllComponent, pauseTimeToHideAllComponent, decodeClarityDic, changeIgnoreHideStopPreview, moveablePtzControlId, tileActionsId, tileTipId, landscapeTipId, multiPtzId, ptzMoveableTipId,
|
|
23
|
+
import { showAllComponent, hideAllComponent, playerTap, startTimeToHideAllComponent, pauseTimeToHideAllComponent, decodeClarityDic, changeIgnoreHideStopPreview, moveablePtzControlId, tileActionsId, tileTipId, landscapeTipId, multiPtzId, ptzMoveableTipId, showFlowLowTipId, zoomLevelChange, setScaleMultipleEvent, trialCountdownEnd, refreshSmartImageQualityEvent } from './constant';
|
|
20
24
|
import BottomLeftContent from './bottomLeftContent';
|
|
21
25
|
import BottomRightContent from './bottomRightContent';
|
|
22
26
|
import TopLeftContent from './topLeftContent';
|
|
23
27
|
import TopRightContent from './topRightContent';
|
|
24
28
|
import { useOfflineShownNotification } from './useOfflineShownNotification';
|
|
25
|
-
import { FlowLowTip, VideoBitKBP
|
|
29
|
+
import { FlowLowTip, VideoBitKBP } from '../widgets';
|
|
26
30
|
import { useMemoizedFn } from '../hooks';
|
|
27
31
|
import { Storage } from '../utils/storage';
|
|
28
32
|
import './ui.less';
|
|
29
33
|
import { updatePlayerWidgetProps } from '../features';
|
|
30
34
|
import { getNgRawData, getSmartImageQualityState, isLowPhone } from '../utils/ttt';
|
|
31
|
-
import { getCaptureResultSummary } from '../utils/captureResult';
|
|
32
35
|
import { lensCount } from '../widgets/zoomTurntable/lensSkill';
|
|
33
|
-
import { shouldRenderContent } from './absoluteContent';
|
|
34
36
|
const AutoClarityOnly = _ref => {
|
|
35
37
|
let {
|
|
36
38
|
instance
|
|
@@ -102,6 +104,7 @@ const SCALE_MATCH_EPS = 0.01;
|
|
|
102
104
|
const BOTTOM_RIGHT_SAFE_GAP = 4;
|
|
103
105
|
export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
104
106
|
const {
|
|
107
|
+
renderMode = 'webview',
|
|
105
108
|
className,
|
|
106
109
|
devId,
|
|
107
110
|
style,
|
|
@@ -331,10 +334,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
331
334
|
maxZoomSettings: instance.maxZoomSettings,
|
|
332
335
|
zoomSkill: instance.zoomSkill
|
|
333
336
|
});
|
|
334
|
-
const hasVisibleGuideTip = absoluteContent === null || absoluteContent === void 0 ? void 0 : absoluteContent.some(item => [tileTipId, landscapeTipId, ptzMoveableTipId, ptzControlTipId, zoomTurntableTipId].includes(item.id) && playState === PlayState.PLAYING && shouldRenderContent(item, {
|
|
335
|
-
playState
|
|
336
|
-
}));
|
|
337
|
-
const hasPendingLayoutGuide = (absoluteContent === null || absoluteContent === void 0 ? void 0 : absoluteContent.some(item => item.id === tileTipId)) && !new Storage(devId).getSync(tileTipId);
|
|
338
337
|
|
|
339
338
|
// 默认最大缩放倍数下发给播放器;多镜头设备的上限要按当前镜头换算,交给 zoomTurntable 下发
|
|
340
339
|
useEffect(() => {
|
|
@@ -453,19 +452,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
453
452
|
multiCameraCtx.setPtzStatus(false);
|
|
454
453
|
}, null);
|
|
455
454
|
}, [screenMode, instance]);
|
|
456
|
-
useEffect(() => {
|
|
457
|
-
const {
|
|
458
|
-
multiCameraCtx
|
|
459
|
-
} = instance;
|
|
460
|
-
if (!multiCameraCtx.isSupport || screenMode !== MultiCameraScreenMode.full || hasPendingLayoutGuide) {
|
|
461
|
-
return;
|
|
462
|
-
}
|
|
463
|
-
if (selectedLenInfo.supportPTZ) {
|
|
464
|
-
multiCameraCtx.openDefaultPtz();
|
|
465
|
-
} else if (!selectedLenInfo.supportZoom) {
|
|
466
|
-
multiCameraCtx.setPtzStatus(false);
|
|
467
|
-
}
|
|
468
|
-
}, [instance, screenMode, selectedLenInfo.index, selectedLenInfo.supportPTZ, selectedLenInfo.supportZoom, hasPendingLayoutGuide]);
|
|
469
455
|
useEffect(() => {
|
|
470
456
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
471
457
|
|
|
@@ -473,16 +459,13 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
473
459
|
instance.multiCameraCtx.getNextLayoutStyle().then(res => {
|
|
474
460
|
instance.multiCameraCtx.setNextLayoutStyle(res);
|
|
475
461
|
});
|
|
476
|
-
if (isVerticalFullLayout && screenType === 'vertical') {
|
|
477
|
-
showComponents();
|
|
478
|
-
}
|
|
479
462
|
}, [layoutStyle, screenMode, instance]);
|
|
480
463
|
useEffect(() => {
|
|
481
464
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
482
465
|
|
|
483
466
|
// 组件隐藏时也隐藏镜头名
|
|
484
467
|
instance.multiCameraCtx.showLenNames(!componentHideState);
|
|
485
|
-
}, [componentHideState, instance
|
|
468
|
+
}, [componentHideState, instance]);
|
|
486
469
|
useEffect(() => {
|
|
487
470
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
488
471
|
if (ptzStatus) {
|
|
@@ -493,7 +476,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
493
476
|
}, [instance, ptzStatus]);
|
|
494
477
|
useEffect(() => {
|
|
495
478
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
496
|
-
if (!ptzStatus || screenMode !== MultiCameraScreenMode.full
|
|
479
|
+
if (!ptzStatus || screenMode !== MultiCameraScreenMode.full) {
|
|
497
480
|
instance.hideContent('absolute', ptzMoveableTipId);
|
|
498
481
|
}
|
|
499
482
|
|
|
@@ -507,11 +490,11 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
507
490
|
|
|
508
491
|
// ptz 提示
|
|
509
492
|
const storage = new Storage(devId);
|
|
510
|
-
if (!storage.getSync(ptzMoveableTipId) &&
|
|
493
|
+
if (!storage.getSync(ptzMoveableTipId) && selectedLenInfo.supportPTZ && screenMode === MultiCameraScreenMode.full) {
|
|
511
494
|
instance.showContent('absolute', ptzMoveableTipId);
|
|
512
495
|
}
|
|
513
496
|
}
|
|
514
|
-
}, [instance, ptzStatus, selectedLenInfo, componentHideState, screenMode
|
|
497
|
+
}, [instance, ptzStatus, selectedLenInfo, componentHideState, screenMode]);
|
|
515
498
|
|
|
516
499
|
// 适配横屏进入面板的情况
|
|
517
500
|
useEffect(() => {
|
|
@@ -528,6 +511,8 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
528
511
|
const handDisablePlayerTap = useMemoizedFn(value => {
|
|
529
512
|
disablePlayerTap.current = !!value;
|
|
530
513
|
});
|
|
514
|
+
|
|
515
|
+
// 须在竖屏全屏 effect 之前注册,否则多目首帧 emit('disablePlayerTap') 时 listener 尚未挂载
|
|
531
516
|
useEffect(() => {
|
|
532
517
|
eventRef.current.on('disablePlayerTap', handDisablePlayerTap);
|
|
533
518
|
return () => {
|
|
@@ -537,10 +522,17 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
537
522
|
|
|
538
523
|
// 竖屏全屏副作用处理
|
|
539
524
|
useEffect(() => {
|
|
540
|
-
eventRef.current.emit('disablePlayerTap', false);
|
|
541
|
-
showComponents();
|
|
542
525
|
if (isVerticalFullLayout && screenType === 'vertical') {
|
|
526
|
+
// 竖屏全屏时,控件常驻显示
|
|
527
|
+
eventRef.current.emit(showAllComponent);
|
|
528
|
+
eventRef.current.emit('disablePlayerTap', true);
|
|
529
|
+
eventRef.current.emit(pauseTimeToHideAllComponent);
|
|
530
|
+
// 按宽填充,保证播放流宽度为屏幕宽度,高度自适应设为1倍
|
|
543
531
|
setScaleMultiple(1);
|
|
532
|
+
} else {
|
|
533
|
+
// 短屏或横屏时,恢复自动隐藏
|
|
534
|
+
eventRef.current.emit('disablePlayerTap', false);
|
|
535
|
+
showComponents();
|
|
544
536
|
}
|
|
545
537
|
}, [isVerticalFullLayout, screenType, playerFit]);
|
|
546
538
|
useEffect(() => {
|
|
@@ -699,16 +691,14 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
699
691
|
ipcTTTOperatorLog('hide: 调用停止录制方法');
|
|
700
692
|
setRecording(false, true);
|
|
701
693
|
setIntercom(false, true);
|
|
702
|
-
instance === null || instance === void 0 || instance.
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}).catch(() => {
|
|
711
|
-
ipcTTTOperatorLog('hide: 调用停止录制方法失败');
|
|
694
|
+
instance === null || instance === void 0 || instance.IPCPlayerInstance.stopRecord({
|
|
695
|
+
saveToAlbum: 1,
|
|
696
|
+
success: () => {
|
|
697
|
+
ipcTTTOperatorLog('hide: 调用停止录制方法成功');
|
|
698
|
+
},
|
|
699
|
+
fail: () => {
|
|
700
|
+
ipcTTTOperatorLog('hide: 调用停止录制方法失败');
|
|
701
|
+
}
|
|
712
702
|
});
|
|
713
703
|
ipcTTTOperatorLog('hide: 调用停止对讲方法');
|
|
714
704
|
instance === null || instance === void 0 || instance.IPCPlayerInstance.stopTalk({
|
|
@@ -932,7 +922,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
932
922
|
clearTimeout(timer.current);
|
|
933
923
|
timer.current = null;
|
|
934
924
|
}
|
|
935
|
-
if (!hasUserTappedPlayerRef.current
|
|
925
|
+
if (!hasUserTappedPlayerRef.current) return;
|
|
936
926
|
timer.current = setTimeout(onTimeout, HIDE_COMPONENT_TIME);
|
|
937
927
|
});
|
|
938
928
|
|
|
@@ -961,6 +951,9 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
961
951
|
const listenStart = useMemoizedFn(() => {
|
|
962
952
|
// 重新开始计时(用户还没点过画面时不启动,见 startHideTimer)
|
|
963
953
|
startHideTimer(() => {
|
|
954
|
+
// 定时器触发时从 store 读最新状态,避免启动时闭包拿到过期的 isVerticalFullLayout
|
|
955
|
+
const store = getDefaultStore();
|
|
956
|
+
if (store.get(instance.isVerticalFullLayout) && store.get(instance.screenType) === 'vertical') return;
|
|
964
957
|
triggerEvent(hideAllComponent);
|
|
965
958
|
});
|
|
966
959
|
});
|
|
@@ -975,13 +968,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
975
968
|
if (isHidingByTapRef.current) return;
|
|
976
969
|
setComponentHideState(false);
|
|
977
970
|
});
|
|
978
|
-
useEffect(() => {
|
|
979
|
-
if (hasVisibleGuideTip) {
|
|
980
|
-
showComponents();
|
|
981
|
-
} else {
|
|
982
|
-
listenStart();
|
|
983
|
-
}
|
|
984
|
-
}, [hasVisibleGuideTip]);
|
|
985
971
|
const onChangeIgnoreHideStopPreview = state => {
|
|
986
972
|
setIgnoreStopOnHide(state);
|
|
987
973
|
};
|
|
@@ -1105,23 +1091,32 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1105
1091
|
return false;
|
|
1106
1092
|
});
|
|
1107
1093
|
const playerContainerHeight = screenType === 'vertical' ? (style === null || style === void 0 ? void 0 : style.height) || '100%' : '100vh';
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1094
|
+
const isVerticalFullMode = isVerticalFullLayout && screenType === 'vertical';
|
|
1095
|
+
const lynxVerticalFull = renderMode === 'lynx' && isVerticalFullMode;
|
|
1096
|
+
const viewport = getPlayerViewport(renderMode, isVerticalFullMode, playerContainerHeight);
|
|
1097
|
+
return /*#__PURE__*/React.createElement(PlayerRenderModeContext.Provider, {
|
|
1098
|
+
value: renderMode
|
|
1099
|
+
}, /*#__PURE__*/React.createElement(LynxPlayerAdaptersContext.Provider, {
|
|
1100
|
+
value: props.lynxAdapters || {}
|
|
1101
|
+
}, /*#__PURE__*/React.createElement(UIEventContext.Provider, {
|
|
1110
1102
|
value: {
|
|
1111
1103
|
event: eventRef.current,
|
|
1112
1104
|
componentHideState,
|
|
1113
1105
|
refreshElement
|
|
1114
1106
|
}
|
|
1115
1107
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1116
|
-
className: clsx('ipc-player-content', isSmallScreen && 'ipc-player-content-small-screen', className),
|
|
1108
|
+
className: clsx('ipc-player-content', renderMode === 'lynx' && lynxStyles.root, isSmallScreen && 'ipc-player-content-small-screen', className),
|
|
1117
1109
|
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, defaultCSSVariable), CSSVariable), style), {}, {
|
|
1118
1110
|
height: playerContainerHeight
|
|
1119
|
-
}
|
|
1111
|
+
}, lynxVerticalFull ? {
|
|
1112
|
+
backgroundColor: '#000'
|
|
1113
|
+
} : {})
|
|
1120
1114
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1115
|
+
className: lynxVerticalFull ? lynxStyles.verticalViewport : undefined,
|
|
1116
|
+
style: viewport.style
|
|
1117
|
+
}, /*#__PURE__*/React.createElement(IPCPlayer, _extends({}, renderMode === 'lynx' ? {
|
|
1118
|
+
renderMode: 'lynx'
|
|
1119
|
+
} : {}, {
|
|
1125
1120
|
defaultMute: mute,
|
|
1126
1121
|
devId: devId,
|
|
1127
1122
|
onlineStatus: deviceOnline,
|
|
@@ -1133,9 +1128,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1133
1128
|
onCtx: res => {
|
|
1134
1129
|
if (res) {
|
|
1135
1130
|
setCreateCtx(true);
|
|
1136
|
-
if (instance.multiCameraCtx.isSupport) {
|
|
1137
|
-
instance.multiCameraCtx.showLenNames(!componentHideState);
|
|
1138
|
-
}
|
|
1139
1131
|
}
|
|
1140
1132
|
}
|
|
1141
1133
|
// onPlayerTap={handlePlayerClick}
|
|
@@ -1143,7 +1135,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1143
1135
|
onCameraNotifyWeakNetwork: data => {
|
|
1144
1136
|
console.log(`onCameraNotifyWeakNetwork: ${JSON.stringify(data)}`);
|
|
1145
1137
|
},
|
|
1146
|
-
clarity: decodeClarityDic[resolution],
|
|
1138
|
+
clarity: decodeClarityDic[String(resolution).toUpperCase()] || decodeClarityDic.HD,
|
|
1147
1139
|
onZoomChange: onZoomChange
|
|
1148
1140
|
// objectFit={
|
|
1149
1141
|
// screenType === 'vertical'
|
|
@@ -1157,7 +1149,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1157
1149
|
// scaleMultiple={0}
|
|
1158
1150
|
,
|
|
1159
1151
|
awakeStatus: awakeStatus,
|
|
1160
|
-
objectFit:
|
|
1152
|
+
objectFit: viewport.objectFit,
|
|
1161
1153
|
scaleMultiple: scaleMultiple
|
|
1162
1154
|
// 安卓横屏问题
|
|
1163
1155
|
// ptzControllable={screenType === 'vertical'}
|
|
@@ -1166,7 +1158,9 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1166
1158
|
onPlayerTap: data => {
|
|
1167
1159
|
console.log('playerTap event');
|
|
1168
1160
|
if (disablePlayerTap.current) {
|
|
1169
|
-
//
|
|
1161
|
+
// 「禁用」只针对「点画面切换控件显隐」这件事(竖屏全屏下控件要常驻),
|
|
1162
|
+
// 但用户确实点了画面这个事实仍要派发出去 —— 转盘、PTZ 这类浮层靠它收起。
|
|
1163
|
+
// 不派发的话,竖屏全屏下点播放器关不掉转盘(普通竖屏可以,因为那时没禁用)。
|
|
1170
1164
|
console.log('playerTap 事件已禁止显隐切换,仅派发 tap 通知浮层');
|
|
1171
1165
|
eventRef.current.emit(playerTap);
|
|
1172
1166
|
return;
|
|
@@ -1175,17 +1169,17 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1175
1169
|
// 这一下起,自动隐藏倒计时才开始生效
|
|
1176
1170
|
hasUserTappedPlayerRef.current = true;
|
|
1177
1171
|
if (instance.multiCameraCtx.isSupport) {
|
|
1178
|
-
var _instance$
|
|
1179
|
-
const preTapIndex = (_instance$
|
|
1172
|
+
var _instance$multiCamera, _instance$multiCamera2;
|
|
1173
|
+
const preTapIndex = (_instance$multiCamera = (_instance$multiCamera2 = instance.multiCameraCtx.selectedLenInfoRef.current) === null || _instance$multiCamera2 === void 0 ? void 0 : _instance$multiCamera2.index) !== null && _instance$multiCamera !== void 0 ? _instance$multiCamera : prevSelectedIndexRef.current;
|
|
1180
1174
|
const wasHidden = componentHideState;
|
|
1181
1175
|
instance.multiCameraCtx.selectVideoFiredRef.current = false;
|
|
1182
1176
|
if (multiTapTimerRef.current) {
|
|
1183
1177
|
clearTimeout(multiTapTimerRef.current);
|
|
1184
1178
|
}
|
|
1185
1179
|
multiTapTimerRef.current = setTimeout(() => {
|
|
1186
|
-
var _instance$
|
|
1180
|
+
var _instance$multiCamera3, _instance$multiCamera4;
|
|
1187
1181
|
const selectFired = !!instance.multiCameraCtx.selectVideoFiredRef.current;
|
|
1188
|
-
const currentIndex = (_instance$
|
|
1182
|
+
const currentIndex = (_instance$multiCamera3 = (_instance$multiCamera4 = instance.multiCameraCtx.selectedLenInfoRef.current) === null || _instance$multiCamera4 === void 0 ? void 0 : _instance$multiCamera4.index) !== null && _instance$multiCamera3 !== void 0 ? _instance$multiCamera3 : preTapIndex;
|
|
1189
1183
|
if (selectFired && currentIndex === preTapIndex) {
|
|
1190
1184
|
if (wasHidden) {
|
|
1191
1185
|
showComponents();
|
|
@@ -1237,9 +1231,11 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1237
1231
|
limitFlow: limitFlow,
|
|
1238
1232
|
autoWakeUp: autoWakeUp,
|
|
1239
1233
|
extend: _objectSpread(_objectSpread({
|
|
1240
|
-
backgroundColor:
|
|
1234
|
+
backgroundColor: viewport.backgroundColor
|
|
1241
1235
|
}, instance.multiCameraCtx.extendProps), extend)
|
|
1242
|
-
})),
|
|
1236
|
+
}))), /*#__PURE__*/React.createElement(PlayerControlVisibilityContext.Provider, {
|
|
1237
|
+
value: !componentHideState && !refreshElement
|
|
1238
|
+
}, showTopContent && /*#__PURE__*/React.createElement(View, {
|
|
1243
1239
|
className: clsx('ipc-player-top-content', {
|
|
1244
1240
|
'ipc-player-top-content-hide': componentHideState,
|
|
1245
1241
|
'ipc-player-top-content-show': !componentHideState
|
|
@@ -1253,45 +1249,37 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1253
1249
|
ctx: instance
|
|
1254
1250
|
}, renderTopRightContent, !hasVisibleBitrateWidget && /*#__PURE__*/React.createElement(AutoClarityOnly, {
|
|
1255
1251
|
instance: instance
|
|
1256
|
-
})))), /*#__PURE__*/React.createElement(
|
|
1257
|
-
instance: instance,
|
|
1258
|
-
show: !showTopContent || componentHideState || !playerReady
|
|
1259
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
1252
|
+
})))), /*#__PURE__*/React.createElement(View, {
|
|
1260
1253
|
className: clsx('ipc-player-bottom-content', {
|
|
1261
|
-
'ipc-player-bottom-content-hide':
|
|
1262
|
-
'ipc-player-bottom-content-show': !
|
|
1263
|
-
'ipc-player-bottom-content-full':
|
|
1254
|
+
'ipc-player-bottom-content-hide': componentHideState,
|
|
1255
|
+
'ipc-player-bottom-content-show': !componentHideState,
|
|
1256
|
+
'ipc-player-bottom-content-full': isVerticalFullMode
|
|
1264
1257
|
}),
|
|
1265
|
-
style: {
|
|
1258
|
+
style: _objectSpread({
|
|
1266
1259
|
height: screenType === 'vertical' ? '48px' : '72px'
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
componentHideState: bottomHideState,
|
|
1272
|
-
refreshElement
|
|
1273
|
-
}
|
|
1274
|
-
}, /*#__PURE__*/React.createElement(BottomLeftContent, {
|
|
1260
|
+
}, lynxVerticalFull ? {
|
|
1261
|
+
paddingBottom: 0
|
|
1262
|
+
} : {})
|
|
1263
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BottomLeftContent, {
|
|
1275
1264
|
ctx: instance,
|
|
1276
1265
|
reservedRight: bottomRightReserved
|
|
1277
1266
|
}, renderBottomLeftContent), /*#__PURE__*/React.createElement(BottomRightContent, {
|
|
1278
1267
|
ctx: instance,
|
|
1279
1268
|
width: bottomRightStyleWidth,
|
|
1280
1269
|
onWidthChange: handleBottomRightWidthChange
|
|
1281
|
-
}, renderBottomRightContent))), (
|
|
1270
|
+
}, renderBottomRightContent)))), /*#__PURE__*/React.createElement(StandaloneAutoClarity, {
|
|
1271
|
+
instance: instance,
|
|
1272
|
+
show: !showTopContent || componentHideState || !playerReady
|
|
1273
|
+
}), (() => {
|
|
1282
1274
|
if (!absoluteContent || !(absoluteContent !== null && absoluteContent !== void 0 && absoluteContent.length)) return null;
|
|
1283
1275
|
return absoluteContent.map(item => {
|
|
1284
|
-
if (
|
|
1285
|
-
playState
|
|
1286
|
-
})) return null;
|
|
1287
|
-
if (item.id === tileActionsId && isVerticalFullLayout && componentHideState) return null;
|
|
1288
|
-
const contentProps = _objectSpread(_objectSpread(_objectSpread({
|
|
1289
|
-
key: item.id
|
|
1290
|
-
}, item.initProps), instance), {}, {
|
|
1291
|
-
IPCPlayerContext: instance.IPCPlayerInstance
|
|
1292
|
-
});
|
|
1276
|
+
if (item.hidden) return null;
|
|
1293
1277
|
if (item.absoluteNoCoverView) {
|
|
1294
|
-
return /*#__PURE__*/React.createElement(item.content,
|
|
1278
|
+
return /*#__PURE__*/React.createElement(item.content, _objectSpread(_objectSpread(_objectSpread({
|
|
1279
|
+
key: item.id
|
|
1280
|
+
}, item.initProps), instance), {}, {
|
|
1281
|
+
IPCPlayerContext: instance.IPCPlayerInstance
|
|
1282
|
+
}));
|
|
1295
1283
|
}
|
|
1296
1284
|
return /*#__PURE__*/React.createElement(CoverView, {
|
|
1297
1285
|
key: item.id,
|
|
@@ -1299,10 +1287,13 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1299
1287
|
position: 'absolute'
|
|
1300
1288
|
}, item.absolutePosition),
|
|
1301
1289
|
className: item.absoluteContentClassName
|
|
1302
|
-
}, /*#__PURE__*/React.createElement(item.content, _objectSpread(_objectSpread({
|
|
1290
|
+
}, /*#__PURE__*/React.createElement(item.content, _objectSpread(_objectSpread(_objectSpread({
|
|
1291
|
+
key: item.id
|
|
1292
|
+
}, item.initProps), instance), {}, {
|
|
1293
|
+
IPCPlayerContext: instance.IPCPlayerInstance,
|
|
1303
1294
|
// 添加通用变量单独组件类名
|
|
1304
1295
|
className: clsx('absolute-item-container')
|
|
1305
1296
|
})));
|
|
1306
1297
|
});
|
|
1307
|
-
})()));
|
|
1298
|
+
})()))));
|
|
1308
1299
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { EntryTracking } from './fullLinkTracking';
|
|
2
1
|
export declare const miniIdLabs: {
|
|
3
2
|
aiDrawMini: string;
|
|
4
3
|
securityCloudService: string;
|
|
5
4
|
};
|
|
6
5
|
export declare function gotoAIDrawMiniProgram(devId: string, brandColor: string): void;
|
|
7
6
|
export declare function gotoSecurityCloudService(homeId: string, uuid: string): Promise<void>;
|
|
8
|
-
export declare function gotoSecurityCloudService2(devId: string
|
|
7
|
+
export declare function gotoSecurityCloudService2(devId: string): Promise<import("@ray-js/ray-ipc-utils/lib/interface").IRes<unknown>>;
|
package/lib/utils/navigation.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { getServiceUrl, goToMiniProgramByShortLink
|
|
1
|
+
import { getServiceUrl, goToMiniProgramByShortLink } from '@ray-js/ray-ipc-utils';
|
|
2
2
|
import Color from 'color';
|
|
3
|
-
import { appendTrackingQuery } from './fullLinkTracking';
|
|
4
3
|
|
|
5
4
|
// 小程序ID集合
|
|
6
5
|
export const miniIdLabs = {
|
|
@@ -19,15 +18,6 @@ export async function gotoSecurityCloudService(homeId, uuid) {
|
|
|
19
18
|
const url = `godzilla://${miniIdLabs.securityCloudService}${'/pages/serviceList/index'}?homeId=${homeId}&deviceId=${uuid}&categoryCode=${'security_cloud_service'}`;
|
|
20
19
|
goToMiniProgramByShortLink(url, 'right');
|
|
21
20
|
}
|
|
22
|
-
export async function gotoSecurityCloudService2(devId
|
|
23
|
-
|
|
24
|
-
const serviceType = 'security_cloud_service';
|
|
25
|
-
const params = {};
|
|
26
|
-
if (!tracking) return getServiceUrl(devId, serviceType, params, true);
|
|
27
|
-
const result = await getServiceUrl(devId, serviceType, params, false, tracking.utm_rtid);
|
|
28
|
-
if ((result === null || result === void 0 ? void 0 : result.code) !== 0 || !((_result$data = result.data) !== null && _result$data !== void 0 && _result$data.url)) {
|
|
29
|
-
throw new Error('Failed to fetch the cloud service URL');
|
|
30
|
-
}
|
|
31
|
-
const url = appendTrackingQuery(result.data.url, tracking);
|
|
32
|
-
return result.data.type === 2 ? goToMiniProgramByShortLink(url) : jumpToWebView(url);
|
|
21
|
+
export async function gotoSecurityCloudService2(devId) {
|
|
22
|
+
return getServiceUrl(devId, 'security_cloud_service', {}, true);
|
|
33
23
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } 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 { PowerMode } from '../../ports.output';
|
|
7
|
+
import { BatteryStatusIcon } from './statusIcon';
|
|
6
8
|
import './battery.less';
|
|
7
9
|
export const createBattery = _ref => {
|
|
8
10
|
let {
|
|
@@ -44,8 +46,8 @@ export const createBattery = _ref => {
|
|
|
44
46
|
className: clsx(className)
|
|
45
47
|
}, /*#__PURE__*/React.createElement(View, {
|
|
46
48
|
className: "ipc-player-plugin-battery"
|
|
47
|
-
}, !isSolar && batteryCharging ? /*#__PURE__*/React.createElement(
|
|
48
|
-
|
|
49
|
+
}, !isSolar && batteryCharging ? /*#__PURE__*/React.createElement(BatteryStatusIcon, {
|
|
50
|
+
kind: "charging"
|
|
49
51
|
}) : /*#__PURE__*/React.createElement(View, {
|
|
50
52
|
className: "ipc-player-plugin-battery-border"
|
|
51
53
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -58,8 +60,8 @@ export const createBattery = _ref => {
|
|
|
58
60
|
backgroundColor: batteryColor
|
|
59
61
|
},
|
|
60
62
|
className: "ipc-player-plugin-battery-value-value"
|
|
61
|
-
})), isSolar && /*#__PURE__*/React.createElement(
|
|
62
|
-
|
|
63
|
+
})), isSolar && /*#__PURE__*/React.createElement(BatteryStatusIcon, {
|
|
64
|
+
kind: "solar"
|
|
63
65
|
})), /*#__PURE__*/React.createElement(Text, {
|
|
64
66
|
className: "ipc-player-plugin-battery-text"
|
|
65
67
|
}, batteryValue, "%")));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } 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 { PowerMode } from '../../ports.output';
|
|
7
|
+
import { BatteryStatusIcon } from './statusIcon';
|
|
6
8
|
import './battery.less';
|
|
7
9
|
export const createBattery = _ref => {
|
|
8
10
|
let {
|
|
@@ -44,8 +46,8 @@ export const createBattery = _ref => {
|
|
|
44
46
|
className: clsx(className)
|
|
45
47
|
}, /*#__PURE__*/React.createElement(View, {
|
|
46
48
|
className: "ipc-player-plugin-battery"
|
|
47
|
-
}, !isSolar && batteryCharging ? /*#__PURE__*/React.createElement(
|
|
48
|
-
|
|
49
|
+
}, !isSolar && batteryCharging ? /*#__PURE__*/React.createElement(BatteryStatusIcon, {
|
|
50
|
+
kind: "charging"
|
|
49
51
|
}) : /*#__PURE__*/React.createElement(View, {
|
|
50
52
|
className: "ipc-player-plugin-battery-border"
|
|
51
53
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -58,8 +60,8 @@ export const createBattery = _ref => {
|
|
|
58
60
|
backgroundColor: batteryColor
|
|
59
61
|
},
|
|
60
62
|
className: "ipc-player-plugin-battery-value-value"
|
|
61
|
-
})), isSolar && /*#__PURE__*/React.createElement(
|
|
62
|
-
|
|
63
|
+
})), isSolar && /*#__PURE__*/React.createElement(BatteryStatusIcon, {
|
|
64
|
+
kind: "solar"
|
|
63
65
|
})), /*#__PURE__*/React.createElement(Text, {
|
|
64
66
|
className: "ipc-player-plugin-battery-text"
|
|
65
67
|
}, batteryValue, "%")));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Image, View, getSystemInfoSync } from '@ray-js/ray';
|
|
3
|
+
import { usePlayerRenderMode } from '../../renderer/context';
|
|
4
|
+
import chargingImage from '../../res/player-charging.png';
|
|
5
|
+
import solarImage from '../../res/player-solar.png';
|
|
6
|
+
import './statusIcon.less';
|
|
7
|
+
|
|
8
|
+
/** Android needs a real image; geometry is normalized from the stylesheet. */
|
|
9
|
+
export function BatteryStatusIcon(_ref) {
|
|
10
|
+
let {
|
|
11
|
+
kind
|
|
12
|
+
} = _ref;
|
|
13
|
+
const renderMode = usePlayerRenderMode();
|
|
14
|
+
const platform = useMemo(() => {
|
|
15
|
+
var _getSystemInfoSync;
|
|
16
|
+
return renderMode === 'lynx' ? (_getSystemInfoSync = getSystemInfoSync()) === null || _getSystemInfoSync === void 0 ? void 0 : _getSystemInfoSync.platform : '';
|
|
17
|
+
}, [renderMode]);
|
|
18
|
+
const className = `icon-panel icon-panel-${kind} ipc-player-plugin-battery-${kind}`;
|
|
19
|
+
if (renderMode !== 'lynx' || platform !== 'android') return /*#__PURE__*/React.createElement(View, {
|
|
20
|
+
className: className
|
|
21
|
+
});
|
|
22
|
+
if (kind === 'solar') {
|
|
23
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
24
|
+
className: `${className} ipc-player-plugin-battery-solar-image`,
|
|
25
|
+
src: solarImage,
|
|
26
|
+
mode: "aspectFit"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
30
|
+
className: `${className} ipc-player-plugin-battery-charging-image-wrap`
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
32
|
+
className: "ipc-player-plugin-battery-charging-image",
|
|
33
|
+
src: chargingImage,
|
|
34
|
+
mode: "scaleToFill"
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.ipc-player-plugin-battery-charging-image-wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: calc(16px * var(--ipc-player-size-scale, 1));
|
|
4
|
+
height: calc(16px * var(--ipc-player-size-scale, 1));
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
background-image: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ipc-player-plugin-battery-charging-image {
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: calc(-1px * var(--ipc-player-size-scale, 1));
|
|
13
|
+
top: 0;
|
|
14
|
+
width: calc(18px * var(--ipc-player-size-scale, 1));
|
|
15
|
+
height: calc(19px * var(--ipc-player-size-scale, 1));
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ipc-player-plugin-battery-solar-image {
|
|
20
|
+
width: calc(8px * var(--ipc-player-size-scale, 1));
|
|
21
|
+
height: calc(8px * var(--ipc-player-size-scale, 1));
|
|
22
|
+
background-image: none;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
@@ -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
2
|
import React, { useContext, useEffect, useMemo } from 'react';
|
|
3
|
-
import { View, setPageOrientation,
|
|
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';
|
|
@@ -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