Jump to content

[HELP] CEF does not display the browser


DNaumov

Recommended Posts

Posted (edited)

Hello, I have an error related to CEF, my created browser refuses to open localhost. I create a browser, load the url in it - "http://localhost:3000 ", but nothing happens, the browser just doesn't appear. I also tried to enter other urls - "http://127.0.0.1:3000", "192.168.0.**:3000"
The browser does not open in any of the options. Although if I set for example the url - "http://google.com ", then the browser immediately opens google. I have suspicions that the loadBrowserURL() function. He just can't handle the IP, he needs the domain. I will be grateful if someone can help.

Here is my code ( client.lua ) :

local browser = createBrowser ( 1920, 1080, false, false );

function setURL( )
   loadBrowserURL ( source, "http://localhost:3000" );
end;
addEventHandler ( "onClientBrowserCreated", browser, setURL );

addEventHandler( "onClientRender", root, function()
   dxDrawImage( 0, 0, 1920, 1080, browser );
end );

 

Edited by DNaumov
Posted

This most likely on purpose, for security reasons, so servers can't make evil scripts that go through your local servers and grab data that may be private.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...