根据hashost字段 显示 视频
This commit is contained in:
@@ -17,15 +17,13 @@ import {
|
||||
} from '@ant-design/icons';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
// 组件内
|
||||
|
||||
|
||||
|
||||
import DroneLivePlayer from '../VolcRtcPlayer.jsx';
|
||||
import DroneVideoPlayer from './DroneVideoPlayer';
|
||||
import AgoraTextTest from '../AgoraRtc.tsx';
|
||||
import { useWebRTCPlayer } from '../useWebRTCStream.tsx';
|
||||
import VideoPlayer from '../VideoPlayer.tsx';
|
||||
|
||||
import AgrtcRoomRobot from '../AgrtcRoomRobot';
|
||||
import CesiumMap from '../Map.jsx';
|
||||
import DeviceParamModal from './DeviceParamModal';
|
||||
import { getUAVState, getSiteDevice, getSiteUAVList, getsinglePlan, getRobotTaskList, getDeviceTotalData, updateDeviceAliasApi, hasPermission } from '@/api/device.ts';
|
||||
@@ -423,7 +421,7 @@ export default function DeviceOverviewPage() {
|
||||
// 机器人视频
|
||||
// 机器人视频:只有 robotPlayActive = true 才真正拉流
|
||||
const { video: robotVideo, error, ready } = useWebRTCPlayer(
|
||||
(!isUAV && robotPlayActive) ? (selectedDevice?.serialNumber || '') : '',
|
||||
(!isUAV && robotPlayActive && !selectedDevice?.hasHost) ? (selectedDevice?.serialNumber || '') : '',
|
||||
(!isUAV && robotPlayActive)
|
||||
? `webrtc://1.95.137.212/live/livestream/${selectedDevice?.serialNumber}`
|
||||
: ''
|
||||
@@ -878,7 +876,11 @@ export default function DeviceOverviewPage() {
|
||||
/>
|
||||
) : (
|
||||
robotPlayActive ? (
|
||||
robotVideo ? (
|
||||
selectedDevice?.hasHost ? (
|
||||
<div style={{ width: '100%', height: '100%', position: 'relative', overflow: 'hidden', background: '#000', borderRadius: 8 }}>
|
||||
<AgrtcRoomRobot CHANNEL={selectedDevice?.serialNumber || ''} />
|
||||
</div>
|
||||
) : robotVideo ? (
|
||||
<VideoPlayer
|
||||
deviceId={selectedDevice?.device_sn || selectedDevice?.serialNumber}
|
||||
idx={mowerView === 'front' ? 1 : mowerView === 'back' ? 2 : mowerView === 'left' ? 3 : 4}
|
||||
|
||||
Reference in New Issue
Block a user