Jump to content

CEF: How to deal with it?


Jusonex

Recommended Posts

why only yooutube work

  
local width, height = 1600, 900 
  
-- Create the browser 
local webBrowser = createBrowser(width, height, false) 
  
-- Request the pages 
requestBrowserPages({"www.youtube.com", "www.nyan.cat"}) 
  
addEventHandler("onClientRender", root, 
    function() 
        -- Update pixel data 
        updateBrowser(webBrowser) 
  
        -- Draw the line 
        local x, y = 110.7, 1024.15 
        dxDrawMaterialLine3D(x, y, 23.25, x, y, 14.75, webBrowser, 18.2, tocolor(255, 255, 255, 255), x, y+1, 19) 
    end 
) 
  
addCommandHandler("youtube", 
    function() 
        outputChatBox("YouTube?") 
        loadBrowserURL(webBrowser, "https://www.youtube.com/watch?v=kdemFfbS5H0") 
    end 
) 
  
addCommandHandler("nyan", 
    function() 
        outputChatBox("Nyan!") 
        loadBrowserURL(webBrowser, "http://nyan.cat") 
    end 
) 
  
  

Link to comment

You can only load pages that are in the global whitelist or if the client allows it. To request permission to load a web page, call the requestBrowserPages function with a table whose values are the web page URLs you want to load.

Link to comment
  • 2 weeks later...
  • 3 weeks later...

To make things easier, I compiled an installer now: http://jusonex.net/public/mta/awesomium/full-r6657.exe (you have to run it as admin manually).

Most of the work is done now which means it's time to test it carefully.

For this purpose I started a public testserver: mtasa://windows.jusonex.net

If Adobe Flash doesn't work, you'll have to install "Adobe Flash Player for other browsers" (--> http://get.adobe.com/flashplayer/)

Link to comment

I'm doing a little documentation and I'm not sure what parameters has onClientBrowserCursorChange. What is cursor? It's table with cursor position or what?

//edit

Oh, wait. It's calling when CSS cursor property change state? For example when I hover on a link?

Link to comment
Great job with this. Can you post more detailed instructions for installing this?

https://wiki.multitheftauto.com/wiki/Us ... ow_to_test

I added an installer a while ago.

Any clue on when is this going to be implemented?

It has already been implemented, but needs a lot of testing yet. So, if you want to speed it up, it would help a lot if you'd find remainig bugs or especially issues with the URL filter.

btw: New build available: http://jusonex.net/public/mta/awesomium/full-r6798.exe

Link to comment
  • 2 weeks later...

Local and external mode is really needed? Why it can't be based only on blacklists? It's ridiculous I can't simply create link from local to external page. Perchance maybe add setBrowserLocal & isBrowserLocal, ex.

addEventHandler("onClientBrowserNavigate", root, 
    function(url) 
        if string.find(url, "http://") == 1 and isBrowserLocal(source) == true then 
            setBrowserLocal(source, false) 
            loadBrowserUrl(source, url) -- load url again in not-local mode 
        end 
    end 
) 

Link to comment
Great job with this. Can you post more detailed instructions for installing this?

https://wiki.multitheftauto.com/wiki/Us ... ow_to_test

I added an installer a while ago.

Any clue on when is this going to be implemented?

It has already been implemented, but needs a lot of testing yet. So, if you want to speed it up, it would help a lot if you'd find remainig bugs or especially issues with the URL filter.

btw: New build available: http://jusonex.net/public/mta/awesomium/full-r6798.exe

Wondering, not implemented on the default one, right?

Link to comment
Great job with this. Can you post more detailed instructions for installing this?

https://wiki.multitheftauto.com/wiki/Us ... ow_to_test

I added an installer a while ago.

Any clue on when is this going to be implemented?

It has already been implemented, but needs a lot of testing yet. So, if you want to speed it up, it would help a lot if you'd find remainig bugs or especially issues with the URL filter.

btw: New build available: http://jusonex.net/public/mta/awesomium/full-r6798.exe

Wondering, not implemented on the default one, right?

Link to comment
Local and external mode is really needed?

I am gonna think about choosing local/remote mode automatically based upon the protocol in the URI.

Wondering, not implemented on the default one, right?

You mean why it is not implemented in a current release? It is a feature branch yet which will probably be merged as soon as it is stable.

Does it needs the client to install the custom MTA or the server?

Yes, you need both custom server and client. You can download the latest version here: http://jusonex.net/public/mta/awesomium/full-r6798.exe

Link to comment
Jusonex

That's a problem, if the client didn't install it.. it won't work?

Because I can't make every member in my community install it ._.

He literally just explained how the client has to use his Awesomium client. It could be implemented into MTA at some point. But seriously just try for a second and read the replies he posted above.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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