Closed davehorner closed 11 months ago
Thanks! There's two folders:
Tauri based desktop app
React app hosted on github pages
This is the best part. The communication is peer to peet using webrtc with peerjs library.
When the desktop app starts, it gets new peer ID, Then it shows a QR link points to to the web app and containing the ID.
When the react apl is opened in the phone, the ID extracted from the URL and the webapp connects to the PC with peerjs (webrtc)
This way it works even if the phone on the same network or another
As for the controlling, the desktop app emulate keyboard keystrokes
Thanks for the response. I didn't realize you could host a react app like that.
I would like to host the web portion of web on my own github pages. How do you go about making a release with that url hardcoded and what process do you use to push to the website?
Is there a way to package the desktop app to run the web portion locally automatically packaged together with the desktop app?
You can get the desktop app to be with a local http server. I thought to do that in the first place, but for better UX I ended with using webrtc, so it will work even if your phone isn't on the same network, the downside: it won't work if you don't have internet connection
I tried using gh-pages -d dist
in web.
https://github.com/davidhorner/gh-pages/tree/gh-pages
it didn't package everything so that doesn't look right.
i would be appreciative of any notes on how you maintain your gh-pages for this. I will keep playing.
Cool app.
I am able to get it to run locally using
npm run dev -- --host 0.0.0.0
in web andcargo tauri dev
in the desktop.I am wondering how or what you have setup on https://thewh1teagle.github.io/mobslide/ which is where the released binary has the QR code pointed to? Did you host the web folder in github pages?