vcs-controller/ui/static/index.js

22 lines
601 B
JavaScript
Raw Normal View History

2024-07-28 19:41:21 -07:00
const { invoke } = window.__TAURI__.tauri;
2024-08-23 18:35:19 -07:00
import { rtc_init } from "./rtc.js";
2024-07-28 19:41:21 -07:00
function call_camera_connect() {
invoke("connect_to_camera", {})
.then(() => {
let cam_button = document.getElementById("camera_connect_button");
cam_button.innerText = "Connecting to Camera";
cam_button.classList.remove("text-semibold");
cam_button.classList.remove("text-white");
cam_button.classList.add("text-neutral-400")
})
.catch((e) => console.error(e));
}
2024-08-23 18:35:19 -07:00
async function init() {
console.log("Setting up");
await rtc_init();
}
export { init };