@ray-js/ipc-player-integration 0.0.67-beta.1 → 0.0.68-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 -48
- 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 -18
- 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-manifest.json +9 -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/overlay.d.ts +4 -0
- package/lib/renderer/overlay.js +6 -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 +122 -56
- package/lib/ui/bottomRightContent.js +10 -5
- package/lib/ui/scrollHintArrow.d.ts +23 -0
- package/lib/ui/scrollHintArrow.js +83 -0
- package/lib/ui/topLeftContent.js +4 -2
- package/lib/ui/topRightContent.js +4 -2
- package/lib/ui/ui.d.ts +5 -0
- package/lib/ui/ui.js +93 -100
- 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/captureToast/captureToast.d.ts +9 -0
- package/lib/widgets/captureToast/captureToast.js +73 -0
- package/lib/widgets/floodlight/floodlight.js +2 -1
- package/lib/widgets/flowLowTip/flowLowTip.js +2 -1
- package/lib/widgets/fullScreen/fullScreen.js +18 -4
- 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 +16 -5
- package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.less +24 -4
- package/lib/widgets/multiCamera/index.less +0 -1
- package/lib/widgets/multiCamera/landscapeTip.js +5 -2
- package/lib/widgets/multiCamera/moveablePtzControl.js +9 -7
- package/lib/widgets/multiCamera/multiPtz.js +3 -2
- package/lib/widgets/multiCamera/ptzMoveableTip.js +5 -2
- 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 +5 -2
- 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 +4 -3
- package/lib/widgets/ptzControlTip/ptzControlTip.js +9 -4
- package/lib/widgets/ptzControlTip/ptzControlTip.less +6 -0
- package/lib/widgets/realTimeMagnification/realTimeMagnification.js +2 -1
- package/lib/widgets/recordVideo/recordVideo.js +32 -178
- package/lib/widgets/recordVideo/recordVideo.less +74 -17
- package/lib/widgets/recordVideo/recordVideo.test.js +169 -3
- package/lib/widgets/recordVideo/recordVideoTimer.d.ts +3 -0
- package/lib/widgets/recordVideo/recordVideoTimer.js +26 -0
- package/lib/widgets/resolution/fullResolutionControl.js +29 -19
- package/lib/widgets/resolution/resolution.js +3 -2
- package/lib/widgets/screenshot/screenshot.js +35 -125
- package/lib/widgets/screenshot/screenshot.less +40 -1
- package/lib/widgets/screenshot/screenshot.test.js +108 -113
- 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 +3 -21
- 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 +5 -3
- package/lib/widgets/zoomTurntable/zoomTurntableDock.js +4 -4
- package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +32 -19
- package/lib/widgets/zoomTurntable/zoomTurntableTip.js +24 -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 -12
- package/lib/utils/captureResult.js +0 -70
- package/lib/utils/captureResult.test.d.ts +0 -1
- package/lib/utils/captureResult.test.js +0 -223
- 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 -84
- 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/ui/ui.js
CHANGED
|
@@ -6,31 +6,34 @@ import "core-js/modules/esnext.iterator.find.js";
|
|
|
6
6
|
import "core-js/modules/esnext.iterator.map.js";
|
|
7
7
|
import "core-js/modules/esnext.iterator.some.js";
|
|
8
8
|
import React, { useContext, useState, useRef, useMemo, useEffect, useImperativeHandle } from 'react';
|
|
9
|
-
import { View,
|
|
9
|
+
import { View, getSystemInfoSync, usePageEvent, setNavigationBarBack, setPageOrientation, getCurrentPages } from '@ray-js/ray';
|
|
10
10
|
import { unstable_batchedUpdates as batchedUpdates } from '@ray-core/ray';
|
|
11
11
|
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 { getPlayerOverlayHost } from '../renderer/overlay';
|
|
16
|
+
import { PlayerRenderModeContext, PlayerControlVisibilityContext } from '../renderer/context';
|
|
17
|
+
import lynxStyles from '../renderer/index.module.less';
|
|
18
|
+
import { getPlayerViewport } from '../renderer/viewport';
|
|
19
|
+
import { LynxPlayerAdaptersContext } from '../renderer/capabilities';
|
|
15
20
|
import { PlayState, PlayerStreamStatus, MultiCameraScreenMode } from '../interface';
|
|
16
21
|
import { useCtx } from '../ctx/ctx.composition';
|
|
17
|
-
import { useStore, updateAtom } from '../ctx/store';
|
|
22
|
+
import { useStore, updateAtom, getDefaultStore } from '../ctx/store';
|
|
18
23
|
import { UIEventContext } from './context';
|
|
19
|
-
import { showAllComponent, hideAllComponent, playerTap, startTimeToHideAllComponent, pauseTimeToHideAllComponent, decodeClarityDic, changeIgnoreHideStopPreview, moveablePtzControlId, tileActionsId, tileTipId, landscapeTipId, multiPtzId, ptzMoveableTipId,
|
|
24
|
+
import { showAllComponent, hideAllComponent, playerTap, startTimeToHideAllComponent, pauseTimeToHideAllComponent, decodeClarityDic, changeIgnoreHideStopPreview, moveablePtzControlId, tileActionsId, tileTipId, landscapeTipId, multiPtzId, ptzMoveableTipId, showFlowLowTipId, zoomLevelChange, setScaleMultipleEvent, trialCountdownEnd, refreshSmartImageQualityEvent } from './constant';
|
|
20
25
|
import BottomLeftContent from './bottomLeftContent';
|
|
21
26
|
import BottomRightContent from './bottomRightContent';
|
|
22
27
|
import TopLeftContent from './topLeftContent';
|
|
23
28
|
import TopRightContent from './topRightContent';
|
|
24
29
|
import { useOfflineShownNotification } from './useOfflineShownNotification';
|
|
25
|
-
import { FlowLowTip, VideoBitKBP
|
|
30
|
+
import { FlowLowTip, VideoBitKBP } from '../widgets';
|
|
26
31
|
import { useMemoizedFn } from '../hooks';
|
|
27
32
|
import { Storage } from '../utils/storage';
|
|
28
33
|
import './ui.less';
|
|
29
34
|
import { updatePlayerWidgetProps } from '../features';
|
|
30
35
|
import { getNgRawData, getSmartImageQualityState, isLowPhone } from '../utils/ttt';
|
|
31
|
-
import { getCaptureResultSummary } from '../utils/captureResult';
|
|
32
36
|
import { lensCount } from '../widgets/zoomTurntable/lensSkill';
|
|
33
|
-
import { shouldRenderContent } from './absoluteContent';
|
|
34
37
|
const AutoClarityOnly = _ref => {
|
|
35
38
|
let {
|
|
36
39
|
instance
|
|
@@ -102,6 +105,7 @@ const SCALE_MATCH_EPS = 0.01;
|
|
|
102
105
|
const BOTTOM_RIGHT_SAFE_GAP = 4;
|
|
103
106
|
export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
104
107
|
const {
|
|
108
|
+
renderMode = 'webview',
|
|
105
109
|
className,
|
|
106
110
|
devId,
|
|
107
111
|
style,
|
|
@@ -126,6 +130,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
126
130
|
previewEnabled = undefined,
|
|
127
131
|
onPreviewEnabledChange
|
|
128
132
|
} = props;
|
|
133
|
+
const OverlayView = getPlayerOverlayHost(renderMode);
|
|
129
134
|
const {
|
|
130
135
|
event
|
|
131
136
|
} = useContext(UIEventContext);
|
|
@@ -331,10 +336,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
331
336
|
maxZoomSettings: instance.maxZoomSettings,
|
|
332
337
|
zoomSkill: instance.zoomSkill
|
|
333
338
|
});
|
|
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
339
|
|
|
339
340
|
// 默认最大缩放倍数下发给播放器;多镜头设备的上限要按当前镜头换算,交给 zoomTurntable 下发
|
|
340
341
|
useEffect(() => {
|
|
@@ -453,19 +454,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
453
454
|
multiCameraCtx.setPtzStatus(false);
|
|
454
455
|
}, null);
|
|
455
456
|
}, [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
457
|
useEffect(() => {
|
|
470
458
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
471
459
|
|
|
@@ -473,16 +461,13 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
473
461
|
instance.multiCameraCtx.getNextLayoutStyle().then(res => {
|
|
474
462
|
instance.multiCameraCtx.setNextLayoutStyle(res);
|
|
475
463
|
});
|
|
476
|
-
if (isVerticalFullLayout && screenType === 'vertical') {
|
|
477
|
-
showComponents();
|
|
478
|
-
}
|
|
479
464
|
}, [layoutStyle, screenMode, instance]);
|
|
480
465
|
useEffect(() => {
|
|
481
466
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
482
467
|
|
|
483
468
|
// 组件隐藏时也隐藏镜头名
|
|
484
469
|
instance.multiCameraCtx.showLenNames(!componentHideState);
|
|
485
|
-
}, [componentHideState, instance
|
|
470
|
+
}, [componentHideState, instance]);
|
|
486
471
|
useEffect(() => {
|
|
487
472
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
488
473
|
if (ptzStatus) {
|
|
@@ -493,7 +478,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
493
478
|
}, [instance, ptzStatus]);
|
|
494
479
|
useEffect(() => {
|
|
495
480
|
if (!instance.multiCameraCtx.isSupport) return;
|
|
496
|
-
if (!ptzStatus || screenMode !== MultiCameraScreenMode.full
|
|
481
|
+
if (!ptzStatus || screenMode !== MultiCameraScreenMode.full) {
|
|
497
482
|
instance.hideContent('absolute', ptzMoveableTipId);
|
|
498
483
|
}
|
|
499
484
|
|
|
@@ -507,11 +492,11 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
507
492
|
|
|
508
493
|
// ptz 提示
|
|
509
494
|
const storage = new Storage(devId);
|
|
510
|
-
if (!storage.getSync(ptzMoveableTipId) &&
|
|
495
|
+
if (!storage.getSync(ptzMoveableTipId) && selectedLenInfo.supportPTZ && screenMode === MultiCameraScreenMode.full) {
|
|
511
496
|
instance.showContent('absolute', ptzMoveableTipId);
|
|
512
497
|
}
|
|
513
498
|
}
|
|
514
|
-
}, [instance, ptzStatus, selectedLenInfo, componentHideState, screenMode
|
|
499
|
+
}, [instance, ptzStatus, selectedLenInfo, componentHideState, screenMode]);
|
|
515
500
|
|
|
516
501
|
// 适配横屏进入面板的情况
|
|
517
502
|
useEffect(() => {
|
|
@@ -528,6 +513,8 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
528
513
|
const handDisablePlayerTap = useMemoizedFn(value => {
|
|
529
514
|
disablePlayerTap.current = !!value;
|
|
530
515
|
});
|
|
516
|
+
|
|
517
|
+
// 须在竖屏全屏 effect 之前注册,否则多目首帧 emit('disablePlayerTap') 时 listener 尚未挂载
|
|
531
518
|
useEffect(() => {
|
|
532
519
|
eventRef.current.on('disablePlayerTap', handDisablePlayerTap);
|
|
533
520
|
return () => {
|
|
@@ -537,10 +524,17 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
537
524
|
|
|
538
525
|
// 竖屏全屏副作用处理
|
|
539
526
|
useEffect(() => {
|
|
540
|
-
eventRef.current.emit('disablePlayerTap', false);
|
|
541
|
-
showComponents();
|
|
542
527
|
if (isVerticalFullLayout && screenType === 'vertical') {
|
|
528
|
+
// 竖屏全屏时,控件常驻显示
|
|
529
|
+
eventRef.current.emit(showAllComponent);
|
|
530
|
+
eventRef.current.emit('disablePlayerTap', true);
|
|
531
|
+
eventRef.current.emit(pauseTimeToHideAllComponent);
|
|
532
|
+
// 按宽填充,保证播放流宽度为屏幕宽度,高度自适应设为1倍
|
|
543
533
|
setScaleMultiple(1);
|
|
534
|
+
} else {
|
|
535
|
+
// 短屏或横屏时,恢复自动隐藏
|
|
536
|
+
eventRef.current.emit('disablePlayerTap', false);
|
|
537
|
+
showComponents();
|
|
544
538
|
}
|
|
545
539
|
}, [isVerticalFullLayout, screenType, playerFit]);
|
|
546
540
|
useEffect(() => {
|
|
@@ -699,16 +693,14 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
699
693
|
ipcTTTOperatorLog('hide: 调用停止录制方法');
|
|
700
694
|
setRecording(false, true);
|
|
701
695
|
setIntercom(false, true);
|
|
702
|
-
instance === null || instance === void 0 || instance.
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}).catch(() => {
|
|
711
|
-
ipcTTTOperatorLog('hide: 调用停止录制方法失败');
|
|
696
|
+
instance === null || instance === void 0 || instance.IPCPlayerInstance.stopRecord({
|
|
697
|
+
saveToAlbum: 1,
|
|
698
|
+
success: () => {
|
|
699
|
+
ipcTTTOperatorLog('hide: 调用停止录制方法成功');
|
|
700
|
+
},
|
|
701
|
+
fail: () => {
|
|
702
|
+
ipcTTTOperatorLog('hide: 调用停止录制方法失败');
|
|
703
|
+
}
|
|
712
704
|
});
|
|
713
705
|
ipcTTTOperatorLog('hide: 调用停止对讲方法');
|
|
714
706
|
instance === null || instance === void 0 || instance.IPCPlayerInstance.stopTalk({
|
|
@@ -932,7 +924,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
932
924
|
clearTimeout(timer.current);
|
|
933
925
|
timer.current = null;
|
|
934
926
|
}
|
|
935
|
-
if (!hasUserTappedPlayerRef.current
|
|
927
|
+
if (!hasUserTappedPlayerRef.current) return;
|
|
936
928
|
timer.current = setTimeout(onTimeout, HIDE_COMPONENT_TIME);
|
|
937
929
|
});
|
|
938
930
|
|
|
@@ -961,6 +953,9 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
961
953
|
const listenStart = useMemoizedFn(() => {
|
|
962
954
|
// 重新开始计时(用户还没点过画面时不启动,见 startHideTimer)
|
|
963
955
|
startHideTimer(() => {
|
|
956
|
+
// 定时器触发时从 store 读最新状态,避免启动时闭包拿到过期的 isVerticalFullLayout
|
|
957
|
+
const store = getDefaultStore();
|
|
958
|
+
if (store.get(instance.isVerticalFullLayout) && store.get(instance.screenType) === 'vertical') return;
|
|
964
959
|
triggerEvent(hideAllComponent);
|
|
965
960
|
});
|
|
966
961
|
});
|
|
@@ -975,13 +970,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
975
970
|
if (isHidingByTapRef.current) return;
|
|
976
971
|
setComponentHideState(false);
|
|
977
972
|
});
|
|
978
|
-
useEffect(() => {
|
|
979
|
-
if (hasVisibleGuideTip) {
|
|
980
|
-
showComponents();
|
|
981
|
-
} else {
|
|
982
|
-
listenStart();
|
|
983
|
-
}
|
|
984
|
-
}, [hasVisibleGuideTip]);
|
|
985
973
|
const onChangeIgnoreHideStopPreview = state => {
|
|
986
974
|
setIgnoreStopOnHide(state);
|
|
987
975
|
};
|
|
@@ -1105,23 +1093,32 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1105
1093
|
return false;
|
|
1106
1094
|
});
|
|
1107
1095
|
const playerContainerHeight = screenType === 'vertical' ? (style === null || style === void 0 ? void 0 : style.height) || '100%' : '100vh';
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1096
|
+
const isVerticalFullMode = isVerticalFullLayout && screenType === 'vertical';
|
|
1097
|
+
const lynxVerticalFull = renderMode === 'lynx' && isVerticalFullMode;
|
|
1098
|
+
const viewport = getPlayerViewport(renderMode, isVerticalFullMode, playerContainerHeight);
|
|
1099
|
+
return /*#__PURE__*/React.createElement(PlayerRenderModeContext.Provider, {
|
|
1100
|
+
value: renderMode
|
|
1101
|
+
}, /*#__PURE__*/React.createElement(LynxPlayerAdaptersContext.Provider, {
|
|
1102
|
+
value: props.lynxAdapters || {}
|
|
1103
|
+
}, /*#__PURE__*/React.createElement(UIEventContext.Provider, {
|
|
1110
1104
|
value: {
|
|
1111
1105
|
event: eventRef.current,
|
|
1112
1106
|
componentHideState,
|
|
1113
1107
|
refreshElement
|
|
1114
1108
|
}
|
|
1115
1109
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1116
|
-
className: clsx('ipc-player-content', isSmallScreen && 'ipc-player-content-small-screen', className),
|
|
1110
|
+
className: clsx('ipc-player-content', renderMode === 'lynx' && lynxStyles.root, isSmallScreen && 'ipc-player-content-small-screen', className),
|
|
1117
1111
|
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, defaultCSSVariable), CSSVariable), style), {}, {
|
|
1118
1112
|
height: playerContainerHeight
|
|
1119
|
-
}
|
|
1113
|
+
}, lynxVerticalFull ? {
|
|
1114
|
+
backgroundColor: '#000'
|
|
1115
|
+
} : {})
|
|
1120
1116
|
}, /*#__PURE__*/React.createElement(View, {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1117
|
+
className: lynxVerticalFull ? lynxStyles.verticalViewport : undefined,
|
|
1118
|
+
style: viewport.style
|
|
1119
|
+
}, /*#__PURE__*/React.createElement(IPCPlayer, _extends({}, renderMode === 'lynx' ? {
|
|
1120
|
+
renderMode: 'lynx'
|
|
1121
|
+
} : {}, {
|
|
1125
1122
|
defaultMute: mute,
|
|
1126
1123
|
devId: devId,
|
|
1127
1124
|
onlineStatus: deviceOnline,
|
|
@@ -1133,9 +1130,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1133
1130
|
onCtx: res => {
|
|
1134
1131
|
if (res) {
|
|
1135
1132
|
setCreateCtx(true);
|
|
1136
|
-
if (instance.multiCameraCtx.isSupport) {
|
|
1137
|
-
instance.multiCameraCtx.showLenNames(!componentHideState);
|
|
1138
|
-
}
|
|
1139
1133
|
}
|
|
1140
1134
|
}
|
|
1141
1135
|
// onPlayerTap={handlePlayerClick}
|
|
@@ -1143,7 +1137,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1143
1137
|
onCameraNotifyWeakNetwork: data => {
|
|
1144
1138
|
console.log(`onCameraNotifyWeakNetwork: ${JSON.stringify(data)}`);
|
|
1145
1139
|
},
|
|
1146
|
-
clarity: decodeClarityDic[resolution],
|
|
1140
|
+
clarity: decodeClarityDic[String(resolution).toUpperCase()] || decodeClarityDic.HD,
|
|
1147
1141
|
onZoomChange: onZoomChange
|
|
1148
1142
|
// objectFit={
|
|
1149
1143
|
// screenType === 'vertical'
|
|
@@ -1157,7 +1151,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1157
1151
|
// scaleMultiple={0}
|
|
1158
1152
|
,
|
|
1159
1153
|
awakeStatus: awakeStatus,
|
|
1160
|
-
objectFit:
|
|
1154
|
+
objectFit: viewport.objectFit,
|
|
1161
1155
|
scaleMultiple: scaleMultiple
|
|
1162
1156
|
// 安卓横屏问题
|
|
1163
1157
|
// ptzControllable={screenType === 'vertical'}
|
|
@@ -1166,7 +1160,9 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1166
1160
|
onPlayerTap: data => {
|
|
1167
1161
|
console.log('playerTap event');
|
|
1168
1162
|
if (disablePlayerTap.current) {
|
|
1169
|
-
//
|
|
1163
|
+
// 「禁用」只针对「点画面切换控件显隐」这件事(竖屏全屏下控件要常驻),
|
|
1164
|
+
// 但用户确实点了画面这个事实仍要派发出去 —— 转盘、PTZ 这类浮层靠它收起。
|
|
1165
|
+
// 不派发的话,竖屏全屏下点播放器关不掉转盘(普通竖屏可以,因为那时没禁用)。
|
|
1170
1166
|
console.log('playerTap 事件已禁止显隐切换,仅派发 tap 通知浮层');
|
|
1171
1167
|
eventRef.current.emit(playerTap);
|
|
1172
1168
|
return;
|
|
@@ -1175,17 +1171,17 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1175
1171
|
// 这一下起,自动隐藏倒计时才开始生效
|
|
1176
1172
|
hasUserTappedPlayerRef.current = true;
|
|
1177
1173
|
if (instance.multiCameraCtx.isSupport) {
|
|
1178
|
-
var _instance$
|
|
1179
|
-
const preTapIndex = (_instance$
|
|
1174
|
+
var _instance$multiCamera, _instance$multiCamera2;
|
|
1175
|
+
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
1176
|
const wasHidden = componentHideState;
|
|
1181
1177
|
instance.multiCameraCtx.selectVideoFiredRef.current = false;
|
|
1182
1178
|
if (multiTapTimerRef.current) {
|
|
1183
1179
|
clearTimeout(multiTapTimerRef.current);
|
|
1184
1180
|
}
|
|
1185
1181
|
multiTapTimerRef.current = setTimeout(() => {
|
|
1186
|
-
var _instance$
|
|
1182
|
+
var _instance$multiCamera3, _instance$multiCamera4;
|
|
1187
1183
|
const selectFired = !!instance.multiCameraCtx.selectVideoFiredRef.current;
|
|
1188
|
-
const currentIndex = (_instance$
|
|
1184
|
+
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
1185
|
if (selectFired && currentIndex === preTapIndex) {
|
|
1190
1186
|
if (wasHidden) {
|
|
1191
1187
|
showComponents();
|
|
@@ -1237,9 +1233,11 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1237
1233
|
limitFlow: limitFlow,
|
|
1238
1234
|
autoWakeUp: autoWakeUp,
|
|
1239
1235
|
extend: _objectSpread(_objectSpread({
|
|
1240
|
-
backgroundColor:
|
|
1236
|
+
backgroundColor: viewport.backgroundColor
|
|
1241
1237
|
}, instance.multiCameraCtx.extendProps), extend)
|
|
1242
|
-
})),
|
|
1238
|
+
}))), /*#__PURE__*/React.createElement(PlayerControlVisibilityContext.Provider, {
|
|
1239
|
+
value: !componentHideState && !refreshElement
|
|
1240
|
+
}, showTopContent && /*#__PURE__*/React.createElement(View, {
|
|
1243
1241
|
className: clsx('ipc-player-top-content', {
|
|
1244
1242
|
'ipc-player-top-content-hide': componentHideState,
|
|
1245
1243
|
'ipc-player-top-content-show': !componentHideState
|
|
@@ -1253,56 +1251,51 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
1253
1251
|
ctx: instance
|
|
1254
1252
|
}, renderTopRightContent, !hasVisibleBitrateWidget && /*#__PURE__*/React.createElement(AutoClarityOnly, {
|
|
1255
1253
|
instance: instance
|
|
1256
|
-
})))), /*#__PURE__*/React.createElement(
|
|
1257
|
-
instance: instance,
|
|
1258
|
-
show: !showTopContent || componentHideState || !playerReady
|
|
1259
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
1254
|
+
})))), /*#__PURE__*/React.createElement(View, {
|
|
1260
1255
|
className: clsx('ipc-player-bottom-content', {
|
|
1261
|
-
'ipc-player-bottom-content-hide':
|
|
1262
|
-
'ipc-player-bottom-content-show': !
|
|
1263
|
-
'ipc-player-bottom-content-full':
|
|
1256
|
+
'ipc-player-bottom-content-hide': componentHideState,
|
|
1257
|
+
'ipc-player-bottom-content-show': !componentHideState,
|
|
1258
|
+
'ipc-player-bottom-content-full': isVerticalFullMode
|
|
1264
1259
|
}),
|
|
1265
|
-
style: {
|
|
1260
|
+
style: _objectSpread({
|
|
1266
1261
|
height: screenType === 'vertical' ? '48px' : '72px'
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
componentHideState: bottomHideState,
|
|
1272
|
-
refreshElement
|
|
1273
|
-
}
|
|
1274
|
-
}, /*#__PURE__*/React.createElement(BottomLeftContent, {
|
|
1262
|
+
}, lynxVerticalFull ? {
|
|
1263
|
+
paddingBottom: 0
|
|
1264
|
+
} : {})
|
|
1265
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BottomLeftContent, {
|
|
1275
1266
|
ctx: instance,
|
|
1276
1267
|
reservedRight: bottomRightReserved
|
|
1277
1268
|
}, renderBottomLeftContent), /*#__PURE__*/React.createElement(BottomRightContent, {
|
|
1278
1269
|
ctx: instance,
|
|
1279
1270
|
width: bottomRightStyleWidth,
|
|
1280
1271
|
onWidthChange: handleBottomRightWidthChange
|
|
1281
|
-
}, renderBottomRightContent))), (
|
|
1272
|
+
}, renderBottomRightContent)))), /*#__PURE__*/React.createElement(StandaloneAutoClarity, {
|
|
1273
|
+
instance: instance,
|
|
1274
|
+
show: !showTopContent || componentHideState || !playerReady
|
|
1275
|
+
}), (() => {
|
|
1282
1276
|
if (!absoluteContent || !(absoluteContent !== null && absoluteContent !== void 0 && absoluteContent.length)) return null;
|
|
1283
1277
|
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
|
-
});
|
|
1278
|
+
if (item.hidden) return null;
|
|
1293
1279
|
if (item.absoluteNoCoverView) {
|
|
1294
|
-
return /*#__PURE__*/React.createElement(item.content,
|
|
1280
|
+
return /*#__PURE__*/React.createElement(item.content, _objectSpread(_objectSpread(_objectSpread({
|
|
1281
|
+
key: item.id
|
|
1282
|
+
}, item.initProps), instance), {}, {
|
|
1283
|
+
IPCPlayerContext: instance.IPCPlayerInstance
|
|
1284
|
+
}));
|
|
1295
1285
|
}
|
|
1296
|
-
return /*#__PURE__*/React.createElement(
|
|
1286
|
+
return /*#__PURE__*/React.createElement(OverlayView, {
|
|
1297
1287
|
key: item.id,
|
|
1298
1288
|
style: _objectSpread({
|
|
1299
1289
|
position: 'absolute'
|
|
1300
1290
|
}, item.absolutePosition),
|
|
1301
1291
|
className: item.absoluteContentClassName
|
|
1302
|
-
}, /*#__PURE__*/React.createElement(item.content, _objectSpread(_objectSpread({
|
|
1292
|
+
}, /*#__PURE__*/React.createElement(item.content, _objectSpread(_objectSpread(_objectSpread({
|
|
1293
|
+
key: item.id
|
|
1294
|
+
}, item.initProps), instance), {}, {
|
|
1295
|
+
IPCPlayerContext: instance.IPCPlayerInstance,
|
|
1303
1296
|
// 添加通用变量单独组件类名
|
|
1304
1297
|
className: clsx('absolute-item-container')
|
|
1305
1298
|
})));
|
|
1306
1299
|
});
|
|
1307
|
-
})()));
|
|
1300
|
+
})()))));
|
|
1308
1301
|
});
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentConfigProps } from '../../interface';
|
|
3
|
+
type Props = Pick<ComponentConfigProps, 'screenType' | 'brandColor' | 'devId' | 'deleteContent'> & {
|
|
4
|
+
kind: 'screenshot' | 'record';
|
|
5
|
+
imageUrl: string;
|
|
6
|
+
captureId: number;
|
|
7
|
+
};
|
|
8
|
+
declare const CaptureToast: ({ kind, imageUrl, captureId, screenType, brandColor, devId, deleteContent, }: Props) => React.JSX.Element;
|
|
9
|
+
export default CaptureToast;
|