-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to implement new handlers #1
Comments
Thanks for showing interest in this project! Currently I'm in the process of evaluating the API design and how I should wrap CEF functionality. I'm trying to make it as close as to Awesomium so Awesomium users can adapt easily. I am working on core design of Cef3D so expect some major changes soon (thats why I havent pushed anything in almost a month). So for now I cant direct you anywhere on how you can go about implementing new things, it will eventually support every basic functionality that CEF has so unfortunately for now you'll have to wait. |
I really liked the project and I'm using it in a game, could you tell me how I could implement it myself in the copy of CEF3D? I wish you good luck with the project because it really is very good, I am using with directx9 without problems |
The current implemented handlers are |
Hi again thanks for responding I did the test I did add a MessageBox to know every time a function is returning a value in 'cefclient source' and it worked, but in my code, it does not |
Hey, I quickly looked at your code and realized you missed this: Add this to the header and it should totally work. You need to tell CefClient to use this class when its trying to understand which RequestHandler to use. |
Another thing, since there is no javascript to C++ bindings yet, if you want to quickly do it yourself you can look through this repository in its old state. I've used this project on my engine a year ago. Here is a video where im demonstrating this. And about 3 months ago I decided to resurrect this project and decouple it from my engine. You can see here for the old state of this project with working javascript to c++ (or the reverse) bindings. The magic happens here and here. Again you dont actually need this, just to give a direction. You can always look at the official CEF sample for ideas. |
Thanks again, I got it! CefResourceManager::AddArchiveProvider would add .zip as a site? Myzip.zip contains a .html file named index.html If you access the url http://test will display all the contents of myzip.zip (index.html)? |
Unfortunately I have no experience with CefResourceManager. The "archive" might be a pak file. I'm not sure |
I've noticed that fps in videos and animations does not exceed 30 even framerate setting higher through command line, do you have any idea what it could be? |
Could you let me know what this is for? How could I pass all values received in |
Here is an overview of how "extension" works in Cef. An extension is a global javascript object. When the renderer thread is ready, we pass a javascript object to Extension string: We can trace back this javascript extension code. Since V8 is on renderer process, the extension loading should be there too. Here is CefSubProcess sending the extension string from a hardcoded path. You should write your own javascript string here.And here is the What is this for? Now looking at the I hope this can give a rough idea how to handle bindings from/to c++/javascript. It gave me headaches until I figured it out too. |
Thanks, I added the v8, however, I have a small problem with the parameters, Cef3D.log returns the error: I would like you to look at my code, because I did exactly the same as yours. Cef3D.js
Page.html
Well, if I use the function without parameter, it works bool Cef3DV8Handler::Execute
Could you help me figure out why this error when using parameter? |
Can you try And
Another tip: if you "Attach to Process" in Visual Studio and pick the cef3d subprocess you can debug V8Handler::Execute function. |
I was researching something to make things easier using html and javascript, I found the REACT, and realized that in your engine, you used REACT, this library is made the page using webpack in nodejs and compiling or I can simply create an html file and To include the scripts and use? |
Well, since its HTML and stuff, you can do whatever you want. I recommend tutorials like this to get you started on React + webpack. There are tons of tutorials online. You dont have to use any compilers though. React works with vanilla javascript. |
I really liked your project, I'd like to implement new handlers, such as CefSchemeHandlerFactory, CefResourceHandler, and CefStreamResourceHandler
How could I do this?
The text was updated successfully, but these errors were encountered: