Skip to content

Feature/wasm remote3#2104

Open
thibaudk wants to merge 28 commits into
masterfrom
feature/wasm-remote3
Open

Feature/wasm remote3#2104
thibaudk wants to merge 28 commits into
masterfrom
feature/wasm-remote3

Conversation

@thibaudk

@thibaudk thibaudk commented Jul 6, 2026

Copy link
Copy Markdown
Member

Update remote control path
forego HTML injection
accept .wasm requests
Enable CORS

@thibaudk thibaudk requested a review from jcelerier July 6, 2026 17:43
@thibaudk thibaudk force-pushed the feature/wasm-remote3 branch from 31beb64 to 95e5c60 Compare July 6, 2026 17:44
res.set(http::field::access_control_allow_origin, "*");
res.set(http::field::access_control_allow_methods, "GET");

res.set(http::field::server, BOOST_BEAST_VERSION_STRING);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be something more personalized for ossia

}
catch (const std::exception& e)
{
std::cerr << "Error: " << e.what() << '\n';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this integrate more with Qt ?

Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/Http_server.cpp Outdated
Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/Http_server.cpp Outdated
Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/Http_server.hpp Outdated
Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/Http_server.cpp Outdated
Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/Http_server.cpp Outdated
@jcelerier jcelerier mentioned this pull request Jul 9, 2026
Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/Settings/Model.cpp Outdated
Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/Http_server.hpp Outdated
[&req](beast::string_view target)
{
http::response<http::string_body> res{http::status::not_found, req.version()};
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res.set(http::field::server, BOOST_BEAST_VERSION_STRING);

here we really want something that says that this is score

[&req](beast::string_view why)
{
http::response<http::string_body> res{http::status::bad_request, req.version()};
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res.set(http::field::server, BOOST_BEAST_VERSION_STRING);

here we really want something that says that this is score

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a constexpr static OSSIA_SCORE_VERSION_AGENT or something like that ?

[&req](beast::string_view what)
{
http::response<http::string_body> res{http::status::internal_server_error, req.version()};
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/HttpServer/HttpServer.cpp Outdated
SETTINGS_PARAMETER_IMPL(Enabled){QStringLiteral("RemoteControl/Enabled"), false};
SETTINGS_PARAMETER_IMPL(WebUiPath){QStringLiteral("RemoteControl/WebUiPath"), ""};
SETTINGS_PARAMETER_IMPL(ServerAddress){QStringLiteral("RemoteControl/ServerAddress"), "0.0.0.0"};
SETTINGS_PARAMETER_IMPL(ServerPort){QStringLiteral("RemoteControl/ServerPort"), 8080};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should pick a less common port by default ?

Comment thread src/plugins/score-plugin-remotecontrol/RemoteControl/Settings/Model.cpp Outdated
add_library(${PROJECT_NAME} ${SRCS} ${HDRS} ${QRCS})

target_link_libraries(${PROJECT_NAME} PUBLIC score_plugin_scenario score_plugin_js ${QT_PREFIX}::WebSockets)
target_link_libraries(${PROJECT_NAME} PUBLIC score_plugin_scenario score_plugin_js ${QT_PREFIX}::WebSockets ossia)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding ossia here shouldn't be necessary, scenario already links it

Comment thread .gitignore
.clangd
./*.cache
*.zip
build-*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this should stay

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very weird, I did not remember touching that one, especially as it is at the root, not in the remote-control directory.
Anyway, the build-* entry still exists in that file:

build-*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could be something that had been added by @Toine-ddt

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.

3 participants