Skip to content

Commit 20eecf5

Browse files
committed
fix: iframe instance bug
1 parent c60c274 commit 20eecf5

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

GUI/ETVR/src/components/Settings/CamerasModal/CameraModalComponent/index.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import WebSocketHandler from '@components/WebSocket'
2+
13
export interface IProps {
24
cameraHeight: number
35
cameraWidth?: number
@@ -7,14 +9,15 @@ export interface IProps {
79
const CameraModalComponent = (props: IProps) => {
810
return (
911
<div>
10-
<iframe
12+
<WebSocketHandler borderRadius="rounded-[14px]" />
13+
{/* <iframe
1114
name="TV"
1215
class="rounded-xl"
1316
height={props.cameraHeight}
1417
width={props.cameraWidth || '100%'}
1518
src={props.cameraSrc}
1619
allow="accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture full"
17-
/>
20+
/> */}
1821
</div>
1922
)
2023
}

GUI/ETVR/src/components/Settings/CamerasModal/index.tsx

+9-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ export interface IProps {
88
const CamerasModal = (props: IProps) => {
99
return (
1010
<div class="bg-[#333742] rounded-xl pl-[14px] pr-[14px] pb-[14px] pt-[14px] min-w-[500px]">
11-
<For each={props.camerasUrl}>
12-
{(cameraUrl, index) => (
13-
<div class={`mb-[${index() > cameraUrl.length ? '0px' : '22px'}]`}>
14-
<CameraModalComponent cameraHeight={400} cameraSrc={cameraUrl} />
15-
</div>
16-
)}
17-
</For>
11+
<div class="overflow-y-auto">
12+
<For each={props.camerasUrl}>
13+
{(cameraUrl, index) => (
14+
<div class={` mb-[${index() > cameraUrl.length ? '0px' : '22px'}]`}>
15+
<CameraModalComponent cameraHeight={400} cameraSrc={cameraUrl} />
16+
</div>
17+
)}
18+
</For>
19+
</div>
1820
</div>
1921
)
2022
}

0 commit comments

Comments
 (0)