|
@@ -6,11 +6,13 @@ import { ScreenPlayer } from '@/components';
|
|
|
import { ptzStart, ptzStop, ptzTool } from './service';
|
|
import { ptzStart, ptzStop, ptzTool } from './service';
|
|
|
import { useRef, useState } from 'react';
|
|
import { useRef, useState } from 'react';
|
|
|
import './index.less';
|
|
import './index.less';
|
|
|
|
|
+import { useDomFullHeight } from '@/hooks';
|
|
|
|
|
|
|
|
const SplitScreen = () => {
|
|
const SplitScreen = () => {
|
|
|
const [deviceId, setDeviceId] = useState('');
|
|
const [deviceId, setDeviceId] = useState('');
|
|
|
const [channelId, setChannelId] = useState('');
|
|
const [channelId, setChannelId] = useState('');
|
|
|
const player = useRef<any>(null);
|
|
const player = useRef<any>(null);
|
|
|
|
|
+ const { minHeight } = useDomFullHeight(`.splitScreen`);
|
|
|
|
|
|
|
|
const getMediaUrl = (dId: string, cId: string): string => {
|
|
const getMediaUrl = (dId: string, cId: string): string => {
|
|
|
return ptzStart(dId, cId, 'mp4');
|
|
return ptzStart(dId, cId, 'mp4');
|
|
@@ -24,7 +26,7 @@ const SplitScreen = () => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<PageContainer>
|
|
<PageContainer>
|
|
|
- <Card>
|
|
|
|
|
|
|
+ <Card style={{ minHeight }} className="splitScreen">
|
|
|
<div className="split-screen">
|
|
<div className="split-screen">
|
|
|
<LeftTree onSelect={mediaStart} />
|
|
<LeftTree onSelect={mediaStart} />
|
|
|
<div className="right-content">
|
|
<div className="right-content">
|