PlayAkoya Posted July 19, 2015 Share Posted July 19, 2015 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
PlayAkoya Posted July 20, 2015 Author Share Posted July 20, 2015 Can I help someone here? Link to comment
Dealman Posted July 20, 2015 Share Posted July 20, 2015 I haven't messed around with any of the browsers yet, but since you seem to render it using dxDrawImage I guess you could just use dxCreateRenderTarget? Link to comment
Buffalo Posted July 21, 2015 Share Posted July 21, 2015 You should use specific video tags in the link (embed and autoplay): https://www.youtube.com/embed/IhchfhxvPKI?autoplay=1' Link to comment
PlayAkoya Posted July 21, 2015 Author Share Posted July 21, 2015 @Buffalo: Now it will start immediately but the problem is that the video edge rises briefly and then back to. This does not happen you will be right in the video! Would love to do it and at iRace: mtasa://144.76.221.194:22003 Hope someone knows the solution! Link to comment
GTX Posted July 21, 2015 Share Posted July 21, 2015 There's small workaround. Cut a bit of top and bottom edge. (Probably use dxDrawImageSection) Link to comment
PlayAkoya Posted July 21, 2015 Author Share Posted July 21, 2015 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
GTX Posted July 21, 2015 Share Posted July 21, 2015 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
PlayAkoya Posted July 22, 2015 Author Share Posted July 22, 2015 @GTX: Thx! You are the best Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now