centricular/gstcefsrc

registering JS Callbacks using RenderProcessHandler::OnContextCreated()

Opened this issue · 1 comments

hevc commented

Hi,
I'm trying to register custom callback from JS to C++ using this tutorial: https://bitbucket.org/chromiumembedded/cef/wiki/JavaScriptIntegration#markdown-header-using-js-callbacks. I wrote something like that:
class App : public CefApp, public CefRenderProcessHandler with OnContextCreated(...) and
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() returning this.

Unfortunately the callback OnContextCreated is never called.

Maybe it is related to a wrong thread. The V8 execution must take place on TID_RENDERER thread.

Do you know how to handle callback registration. Is it possible? Maybe another way to achieve it?
It will be nice to have direct communication between C++ and js.

We want something like: https://github.com/Igalia/gst-wpe-webrtc-demo. but without additional server.

I'm afraid I have absolutely no idea :)