Esmail Mahjoor Posted July 22, 2022 Share Posted July 22, 2022 Hi How can I close a created browser after hiding contained window? the issue is that a video is playing in browser and when user closes the window, video keeps playing. local screenWidth, screenHeight = guiGetScreenSize() local window = guiCreateWindow( 0, 0, screenWidth, screenHeight, "Web Browser", false ) local browser = guiCreateBrowser(10, 10, screenWidth-10, screenHeight-10, true, false, false, window) local the_browser = guiGetBrowser(browser) --outputConsole("Creating Browser") addEventHandler("onClientBrowserCreated", the_browser, function() res = loadBrowserURL(source, "http://mta/local/web/page.html") end ) Link to comment
Moderators Vinyard Posted July 22, 2022 Moderators Share Posted July 22, 2022 Hi, welcome to the forums! I've moved your thread to the Scripting section as this is the right place to get assistance with scripting-related problems. 1 Link to comment
#\_oskar_/# Posted July 22, 2022 Share Posted July 22, 2022 destroyElement + isElement 1 Link to comment
Esmail Mahjoor Posted July 22, 2022 Author Share Posted July 22, 2022 That worked, thanks a lot. took hours looking for answer. Link to comment
#\_oskar_/# Posted July 22, 2022 Share Posted July 22, 2022 6 hours ago, Esmail Mahjoor said: That worked, thanks a lot. took hours looking for answer. you're welcome 1 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