Commit 68534dd 1 parent 14923e0 commit 68534dd Copy full SHA for 68534dd
File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import NewWindow from '@components/NewWindow'
8
8
import ToastNotificationWindow from '@components/Notifications'
9
9
import { setOpenModal } from '@src/store/ui/ui'
10
10
import { BUTTON } from '@static/custom/button'
11
+ import { generateWebsocketClients } from '@store/api/components/actions'
12
+ import { setWebsocketClients } from '@store/api/websocket'
11
13
12
14
const handleTitlebar = ( ) => {
13
15
const titlebar = document . getElementsByClassName ( 'titlebar' )
@@ -85,6 +87,9 @@ const App = () => {
85
87
onMount ( ( ) => {
86
88
handleTitlebar ( )
87
89
handleAppBoot ( )
90
+ // TODO: call these after the MDNS service is up and running and discoveres the camera's
91
+ const clients = generateWebsocketClients ( )
92
+ setWebsocketClients ( clients )
88
93
} )
89
94
return (
90
95
< div class = "App overflow-y-auto items-center" >
Original file line number Diff line number Diff line change 1
1
import { Image } from '@kobalte/core'
2
2
import { onMount , Show } from 'solid-js'
3
3
import icons from '@assets/images/index'
4
- import { generateWebsocketClients } from '@store/api/components/actions'
5
- import { setWebsocketClients } from '@store/api/websocket'
6
4
import { showCameraView } from '@store/ui/selectors'
7
5
import { initWebSocket } from '@utils/hooks/websocket'
8
6
@@ -27,10 +25,6 @@ const LoaderHandler = (props: IProps) => {
27
25
28
26
const WebSocketHandler = ( props : IProps ) => {
29
27
onMount ( async ( ) => {
30
- // TODO: call these after the MDNS service is up and running and discoveres the camera's
31
- /* const clients = generateWebsocketClients()
32
- setWebsocketClients(clients) */
33
-
34
28
initWebSocket ( )
35
29
} )
36
30
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const generateWebsocketClients = () => {
7
7
const clients = cameras ( ) . map ( ( _ , i ) => {
8
8
return new WebSocket ( `${ LOCAL_HOST } :${ PORT } /camera_${ i + 1 } ` )
9
9
} )
10
+ console . log ( 'websocket clients' , clients )
10
11
return clients
11
12
}
12
13
You can’t perform that action at this time.
0 commit comments