Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables to record the Emscripten canvas with audio.
True or 1 starts the recording, false or 0 stops and downloads it.
I am sure it can be finetuned (codec wise for example).
I included this js file, which solves a timecode issue: https://github.com/yusitnikov/fix-webm-duration
https://recorder.handmadeproductions.de/
And it would be really great to choose any
ofTexture
for recording.I already tried to achieve that, but i think somehow I need to draw the texture to another js canvas every draw circle (like the ofWindow in
ofxAppEmscriptenWindow.cpp
). Maybe someone can help me with that?Maybe this is related (
emscripten_webgl_make_context_current()
):"If the current browser does not support OffscreenCanvas, you can specify the EMSCRIPTEN_WEBGL_CONTEXT_PROXY_ALWAYS WebGL context creation flag. If this flag is passed, and code was compiled with -sOFFSCREEN_FRAMEBUFFER enabled, the WebGL context will be created as a “proxied context”. In this context mode, the WebGLRenderingContext object will actually be created on the main browser thread, and all WebGL API calls will be proxied as asynchronous messages from the pthread into the main thread. This will have a performance and latency impact in comparison to OffscreenCanvas contexts, however unlike OffscreenCanvas-based contexts, proxied contexts can be shared across any number of pthreads: you can use the emscripten_webgl_make_context_current() function in any pthread to activate and deactivate access to the WebGL context: for example, you could have one WebGL loading thread, and another WebGL rendering thread that coordinate shared access to the WebGL rendering context by cooperatively acquiring and releasing access to the WebGL rendering context via the emscripten_webgl_make_context_current() function. Proxied contexts do not require any special support from the browser, so any WebGL capable browser can create a proxied WebGL context."
https://emscripten.org/docs/api_reference/html5.h.html