中英文切换 初始化

This commit is contained in:
mmc
2026-08-12 11:29:44 +08:00
parent 541e16f742
commit a8af55a856
76 changed files with 5847 additions and 1962 deletions

View File

@@ -5,6 +5,7 @@ import DroneLivePlayer from '../VolcRtcPlayer.jsx';
import { changeCameragateway, changeCameraPlane } from '../../api/device.ts';
import utils from '../../lib/utils';
import AgoraRtcRoom from '../AgoraRtc.tsx';
import { useTranslation } from 'react-i18next';
const { Text } = Typography;
@@ -38,6 +39,7 @@ const DroneVideoPlayer: React.FC<DroneVideoPlayerProps> = ({
const [internalVideoSource, setInternalVideoSource] = useState<'station' | 'drone'>(defaultSource);
const videoSource = propsVideoSource !== undefined ? propsVideoSource : internalVideoSource;
const setVideoSource = (source: 'station' | 'drone') => {
const { t } = useTranslation();
if (onSourceChange) onSourceChange(source);
else setInternalVideoSource(source);
};
@@ -237,6 +239,8 @@ const DroneVideoPlayer: React.FC<DroneVideoPlayerProps> = ({
const isDrone = type === 'drone';
const currentDisplayType = displayType || type;
const data = statusData;
const { t } = useTranslation();
return (
<div style={{
@@ -327,7 +331,7 @@ const DroneVideoPlayer: React.FC<DroneVideoPlayerProps> = ({
}}>
{loading ? <ReloadOutlined spin style={{ color: '#fff' }} /> : null}
<span style={{ color: '#fff', fontSize: 12 }}>
{loading ? '视频加载中...' : '暂无视频信号'}
{loading ? t('video.videoLoading') : '暂无视频信号'}
</span>
</div>
)}