I'm trying to call an async function, 'isConfigSupported
<https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/isConfigSupported_static>'
from WebCodecs API.
Here is what I did in C++,
val VideoDecoder = val::global("VideoDecoder");
ConfigCodec* config = new ConfigCodec(); // some struct
config->codec = "vp8";
config->codedWidth = 640;
config->codedHeight = 480;
val result = VideoDecoder.call<val>("isConfigSupported", config).await();
if (result["supported"].as<bool>()) {
EM_ASM(
console.log("Codec is supported");
);
} else {
EM_ASM(
console.error("Codec is not supported");
);
}
I have compiled emcc with this additional option, '-O3 -sASYNCIFY' as
stated in the documentation.
The result is 'Codec is supported', however, I get an error in the console
logs,
wasmapi.wasm:0x1e79f Uncaught (in promise) RuntimeError: unreachable
at wasmapi.wasm:0x1e79f
at wasmapi.wasm:0x1ca34
at wasmapi.wasm:0x118be
at ret.<computed> (wasmapi.js:1:87071)
at Object.doRewind (wasmapi.js:1:88672)
at wasmapi.js:1:89246
Did I miss something? What does this error mean?
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/667e2e81-38ff-4c2e-a930-8cb76e1cffebn%40googlegroups.com.