Feche1320

createBrowser(), allow all pages to load

Recommended Posts

Hello, is there any way to allow the in-game web browser to load any page? for example, when I enter on Gmail, the mail images don't load.

Thanks

Share this post


Link to post

MTA's browser uses CEF which is an open-source chromium browser platform. By default however MTA has a protection feature for players, by making it so that they have to verify or confirm the site that they are entering, unless it is a site that MTA by default has allowed. This can be bypassed if you run a site with its own virtual browser. This makes it so when the players confirm your site, they will no longer have to confirm any others.

Share this post


Link to post

Or listen for the resourceBlocked event and request each blocked domain to be unblocked.

addEventHandler('onClientBrowserResourceBlocked', browser, function(url)
    requestBrowserDomains({url}, true, function(accepted)
      if accepted then
        reloadBrowserPage(browser)
      end
    end)
end)

 

Share this post


Link to post

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.