优化视频显示加载占位

This commit is contained in:
mmc
2026-09-08 16:09:55 +08:00
parent 39e5e80926
commit 7ebba1bbf6
2 changed files with 33 additions and 20 deletions

View File

@@ -1224,7 +1224,7 @@ export default function DeviceStatusPage() {
{/* 视频层:停止时不渲染 / 未播放时为空,不影响状态面板 */}
{isVideoPlaying && (
mowerView === 'all' ? (
robotVideo ? (
(
<div style={{ width: '100%', height: '100%' }}>
<MowerAllView
serialNumber={device?.serialNumber}
@@ -1233,12 +1233,12 @@ export default function DeviceStatusPage() {
ready={ready}
/>
</div>
) : null
)
) : mowerView === 'front' ? (
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
{device?.hasHost ? (
<AgrtcRoomRobot CHANNEL={device?.serialNumber || ''} />
) : robotVideo ? (
) : (
<VideoPlayer
deviceId={device?.serialNumber}
idx={1}
@@ -1247,7 +1247,7 @@ export default function DeviceStatusPage() {
error={error}
ready={ready}
/>
) : null}
)}
</div>
) : (
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
@@ -1268,7 +1268,7 @@ export default function DeviceStatusPage() {
)}
{/* 视频未加载 / 停止播放的占位 */}
{(!robotVideo && !isVideoPlaying) && (
{!isVideoPlaying && (
<div style={{
width: '100%', height: '100%',
display: 'flex', alignItems: 'center', justifyContent: 'center',