Jump to content

[HELP] Make with createBrowser a login? (Background)


Recommended Posts

Hi together,

I 'd like to do a login which is happening now in the background a video.

My problem is that YouTube is always at the beginning of the frame window will open and you can see it from YouTube 's would like that you only see the video and nothing else!

How do I get it out that the video starts immediately and no frame drum is start at the beginning?

local screenWidth, screenHeight = guiGetScreenSize() 
local webBrowser = createBrowser(screenWidth, screenHeight, false, false) 
  
function webBrowserRender() 
    dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) 
end 
  
  
addEventHandler("onClientBrowserCreated", webBrowser,  
    function() 
    loadBrowserURL(webBrowser, "https://www.youtube.com/tv#/watch?v=IhchfhxvPKI") 
    addEventHandler("onClientRender", root, webBrowserRender) 
end) 

I hope you can help me.

Link to comment

Hi, GTX

Thanks for your answer!

Could you help me with the implementation. (dxDrawImageSection?)

local screenWidth, screenHeight = guiGetScreenSize() 
local webBrowser = createBrowser(screenWidth, screenHeight, false, false) 
  
function webBrowserRender() 
    dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) 
end 
  
  
addEventHandler("onClientBrowserCreated", webBrowser,  
    function() 
    loadBrowserURL(webBrowser, "https://www.youtube.com/embed/IhchfhxvPKI?rel=0&autoplay=1&loop=1&playlist=IhchfhxvPKI") 
    addEventHandler("onClientRender", root, webBrowserRender) 
end) 

Link to comment

There you go.

local screenWidth, screenHeight = guiGetScreenSize() 
local webBrowser = createBrowser(screenWidth, screenHeight, false, false) 
  
function webBrowserRender() 
    dxDrawImageSection(0, 0, screenWidth, screenHeight, 50, 50, screenWidth-100, screenHeight-100, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) 
end 
  
  
addEventHandler("onClientBrowserCreated", webBrowser, 
    function() 
    loadBrowserURL(webBrowser, "https://www.youtube.com/embed/IhchfhxvPKI?rel=0&autoplay=1&loop=1&playlist=IhchfhxvPKI") 
    addEventHandler("onClientRender", root, webBrowserRender) 
end) 

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