优化视频显示加载占位
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user