From 4a28e4f8874ae8f951ceba2108f7ac8c7d37b849 Mon Sep 17 00:00:00 2001 From: Baud Date: Thu, 30 May 2024 23:16:48 +0100 Subject: [PATCH] bodge: URL probably won't change right? --- frontend/src/app.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/app.rs b/frontend/src/app.rs index 3bdc5f0..5078239 100644 --- a/frontend/src/app.rs +++ b/frontend/src/app.rs @@ -6,8 +6,8 @@ use std::{ use egui::{Button, Color32, RichText, Rounding, Sense, Stroke, Vec2}; use ewebsock::{Options, WsReceiver, WsSender}; -use wasm_timer::Instant; use js_sys::eval; +use wasm_timer::Instant; use crate::websocket::{ AddHyperdeckRequest, ClientRequest, HyperdeckConnectionState, HyperdeckRecordBay, @@ -28,10 +28,7 @@ pub struct HyperdeckMonitorApp { impl Default for HyperdeckMonitorApp { fn default() -> Self { - // returns voc.emf.camp:9681/ - let window_location = eval("window.location.host").unwrap().as_string().unwrap(); - // returns ws://voc.emf.camp:9681 - let api_websocket_location = format!("ws://{}ws", window_location); + let api_websocket_location = format!("ws://voc.emf.camp:9681/ws", window_location); let (ws_sender, ws_receiver) = ewebsock::connect(api_websocket_location, Options::default()).unwrap(); Self {