中英文切换 初始化
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user