bodge: URL probably won't change right?
This commit is contained in:
parent
7d9bd08173
commit
4a28e4f887
|
@ -6,8 +6,8 @@ use std::{
|
||||||
|
|
||||||
use egui::{Button, Color32, RichText, Rounding, Sense, Stroke, Vec2};
|
use egui::{Button, Color32, RichText, Rounding, Sense, Stroke, Vec2};
|
||||||
use ewebsock::{Options, WsReceiver, WsSender};
|
use ewebsock::{Options, WsReceiver, WsSender};
|
||||||
use wasm_timer::Instant;
|
|
||||||
use js_sys::eval;
|
use js_sys::eval;
|
||||||
|
use wasm_timer::Instant;
|
||||||
|
|
||||||
use crate::websocket::{
|
use crate::websocket::{
|
||||||
AddHyperdeckRequest, ClientRequest, HyperdeckConnectionState, HyperdeckRecordBay,
|
AddHyperdeckRequest, ClientRequest, HyperdeckConnectionState, HyperdeckRecordBay,
|
||||||
|
@ -28,10 +28,7 @@ pub struct HyperdeckMonitorApp {
|
||||||
|
|
||||||
impl Default for HyperdeckMonitorApp {
|
impl Default for HyperdeckMonitorApp {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
// returns voc.emf.camp:9681/
|
let api_websocket_location = format!("ws://voc.emf.camp:9681/ws", window_location);
|
||||||
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 (ws_sender, ws_receiver) =
|
let (ws_sender, ws_receiver) =
|
||||||
ewebsock::connect(api_websocket_location, Options::default()).unwrap();
|
ewebsock::connect(api_websocket_location, Options::default()).unwrap();
|
||||||
Self {
|
Self {
|
||||||
|
|
Loading…
Reference in New Issue