Jump to content

web browser & youtube


MAB

Recommended Posts

Thank you guys for trying to help..Dealman yours isn't working .. the html thing is here but i see nothing...i used a html file and the createBrowser function example :

meta:

     

client:

local screenWidth, screenHeight = guiGetScreenSize() 
  
--Let's create a new browser in local mode. We will not be able to load an external URL. 
local webBrowser = createBrowser(screenWidth, screenHeight, true, false) 
  
--This is the function to render the browser. 
function webBrowserRender() 
    --Render the browser on the full size of the screen. 
    dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) 
end 
  
--The event onClientBrowserCreated will be triggered, after the browser has been initialized. 
--After this event has been triggered, we will be able to load our URL and start drawing. 
addEventHandler("onClientBrowserCreated", webBrowser,  
    function() 
        --After the browser has been initialized, we can load our file. 
        loadBrowserURL(webBrowser, "http://mta/local/hal.html") 
        --Now we can start to render the browser. 
        addEventHandler("onClientRender", root, webBrowserRender) 
    end 
) 

html:

"1280" height="768" src="https://www.youtube.com/embed/5VzprYCxPBQ?autoplay=1" frameborder="0" allowfullscreen> 

Link to comment

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...