let pingInterval;
        let reconnectInterval;

        app.ports.socketConnect.subscribe((message) => {
            clearInterval(pingInterval)
            clearInterval(reconnectInterval)

            let location = ((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.host + message;
            console.log("Opening socket to " + location)
            socket = new WebSocket(location);

            // Presentation has started, enter fullscreen
            document.body.request