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

Web support #33

Open
maresc-g opened this issue Nov 5, 2024 · 2 comments
Open

Web support #33

maresc-g opened this issue Nov 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@maresc-g
Copy link

maresc-g commented Nov 5, 2024

Hello,

Do you plan on making your plugin available for web platforms ?
Right now the web export fails with this error

No suitable library found for GDExtension: res://addons/godot_midi/godotmidi.gdextension. Possible feature flags for your platform: web, s3tc, nothreads, wasm32, template, debug, template_debug, single

Thanks

@nlaha nlaha added help wanted Extra attention is needed enhancement New feature or request labels Nov 7, 2024
@maresc-g
Copy link
Author

So I had to update the code because for some reason it is not possible to use std::system_clock::now so I am using godot::Time now instead

Also for people that want to know how to build a web plugin, you need to install emscripten but apparently you need to install the same version as godot which seems to be 3.1.63 (for godot 4.3)

Then you need to source ./emsdk_env.sh before you can build the plugin with scons platform=web

Also don't forget to enable this for the web export in your godot project
image

So now the project starts in the web browser but I still have some issues because the time doesn't seem to move in the MidiPlayer thread, I don't know why yet. I don't get any events and the current_time is not updated.

@maresc-g
Copy link
Author

So it turns out that the time not moving comes from a bug in godot 4.3 (see godotengine/godot#95197), it works with 4.4-dev7 and the updates I did for android.
It doesn't work on firefox though, only on chromium based browsers.

@nlaha nlaha removed the help wanted Extra attention is needed label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants