视频 geoserver地址 和 脚本加载优化
This commit is contained in:
@@ -7,6 +7,8 @@ import droneInspectImg from '../assets/images/xunjiancar.png';
|
||||
import gecaocar from '../assets/images/gecaocar.png';
|
||||
import arrowImg from '../assets/images/arrow.png';
|
||||
import iotImg from '../assets/images/iot.png';
|
||||
import envConfig from '../../env';
|
||||
|
||||
|
||||
const CYAN_ALARM_COLOR = new window.Cesium.Color(
|
||||
34 / 255,
|
||||
@@ -307,7 +309,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
|
||||
}
|
||||
|
||||
function fetchPublishedLayers() {
|
||||
const baseUrl = "http://192.168.2.59:7000/geoserver";
|
||||
const baseUrl = envConfig.geoserver_url;
|
||||
//const baseUrl = 'https://gis.caasrobot.com/geoserver';
|
||||
const getCapabilitiesUrl = `${baseUrl}/wms?service=WMS&version=1.1.1&request=GetCapabilities`;
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ export default function DeviceStatusPage({
|
||||
|
||||
const { video: robotVideo, error, ready } = useWebRTCPlayer(
|
||||
serialNumber || '',
|
||||
`webrtc://ri.satabot.com/live/livestream/${serialNumber}`,
|
||||
`webrtc://1.95.137.212/live/livestream/${serialNumber}`,
|
||||
);
|
||||
const getVal = (val) => val === "no_rain" ? "无" : (val || '-');
|
||||
|
||||
@@ -320,7 +320,7 @@ export default function DeviceStatusPage({
|
||||
|
||||
<div
|
||||
style={{
|
||||
height: 450,
|
||||
//height: 450,
|
||||
borderRadius: 8,
|
||||
overflow: 'hidden',
|
||||
display: 'flex',
|
||||
|
||||
@@ -47,7 +47,7 @@ export function useWebRTCPlayer(deviceId: string, url: string) {
|
||||
v.style.height = '100%';
|
||||
v.style.objectFit = 'contain';
|
||||
videoRef.current = v;
|
||||
const token = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijk2ZTQyYzJlLTYwNWMtNGU5MS05ZTJkLWE2NWUxM2VjZTMyZiJ9.l-F0LGxnfUD2WuATaHK7bYlguorGpGkkOR3Qpga7CWU1S_GiRI6U3At0gjOqx7DasZS7ChVsC_Csp6DX6HfArw"
|
||||
const token = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjY0MDVjNDgwLTAxNDYtNDAwNS1iY2RiLTFhMTM2YzlmYmFiMCJ9.V1GQiLr0xgu9LB59pGyYPFeVJfKwDsUtTacFrQDpXdEvD81uOkJO304tROF5Ewev6eXkZFuunUAEiMLWEfh2_w"
|
||||
//const token = localStorage.getItem('videotoken') || JSON.parse(localStorage.getItem('userInfo') || '{}')?.token;
|
||||
const videoUrl = `${url}?token=${token}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user