Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add webRTCgui #130

Merged
merged 1 commit into from
Dec 9, 2022
Merged

Conversation

capital-G
Copy link
Contributor

@capital-G capital-G mentioned this pull request Dec 9, 2022
2 tasks
@dyfer dyfer merged commit 862f8b5 into supercollider-quarks:master Dec 9, 2022
@dyfer
Copy link
Contributor

dyfer commented Dec 9, 2022

Thanks!
Not a deal breaker, but I wasn't sure if the "DemonWidgets" in the quark file is correct?
Also, I'd be curious to see how it compares with the WsGUI quark :-)

@capital-G
Copy link
Contributor Author

Thanks for the hint with demon widgets.

I did not know the existence of your quark, would have saved me some work :/ Maybe it would be time to do something about #117?:)

Comparing it I would assume the difference is on the choices of frameworks: my quark relies on Docker, Vue, SocketIO, Vuetify and Typescript to do the lifting which has such benefits as a very simple setup and also mobile friendly. I really found that typescript is a godsend when sending around messages and really helps me to keep the code compact.

I am still not sure how to reflect the creation of the GUI elements - the SC way is proven but I also found the way of writing GUI elements a bit verbose. But would be also awesome to create something which can replace the existing GUI in-place.

@dyfer
Copy link
Contributor

dyfer commented Dec 9, 2022

I am still not sure how to reflect the creation of the GUI elements - the SC way is proven but I also found the way of writing GUI elements a bit verbose. But would be also awesome to create something which can replace the existing GUI in-place.

My objective was to get as close as possible to existing GUI classes. One idea I had was that one could take the regular GUI code (i.e. a View) and make a web view out of it. That never materialized, but I think it's not too far fetched. There are definitely some caveats etc.
Currently one can manually adapt quite a bit of GUI code fairly easily for WsGUI by replacing class names and correcting the sizes.

@capital-G
Copy link
Contributor Author

On a closer look: Did you use it via the internet or just within the local network? The blocks are there in your project but I have not found you mentioning something. My main motivation is to distribute and sync a GUI via the internet on smartphones via a QR code, see https://remote.dennis-scheiba.com.


Another alternative could be to only replace the Window class so you can use all the existing interfaces which then would only need to be translated to HTML DOM elements, so instead of

(
w = Window();
v = VLayout(*4.collect({Button()}));
w.layout = v;
w.front;
)

one could write

(
w = WebWindow();
v = VLayout(*4.collect({Button()}));
w.layout = v;
w.publish;
)

And WebWindow would do the connection between the state of SC and the HTML state, but I am not able to access the elements of e.g. VLayout - do you know if this is possible or is there some Qt/CPP magic going on in the background?

@dyfer
Copy link
Contributor

dyfer commented Dec 9, 2022

On a closer look: Did you use it via the internet or just within the local network?

I used it on a computer with public IP in a few projects, though it was never stress tested for hundreds/thousands of connections (and would most likely not perform well in that regard). It was used by at least one person for an art installation where audience was asked to connect to some address/ip on their devices. I also did not implement any security, as local network was my primary use case (though I was planning to add some sort of authentication eventually).

Particularly, I was not interested in the idea of separately running a daemon/bridge, since in my use case I wanted it to "just work" from within SC, with no additional setup.

SC's Layout stuff is provided by Qt so there's no way to leverage that easily. IIRC @mtmccrea implemented some basic layout functionality in sclang for WsGUI (WsHLayout etc), trying to mimic Qt behavior in a basic sense at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants