Jump to content

[HELP ]YouTube video playing not works


MrZsemle

Recommended Posts

Hi! I created a cinema script, but when i want to show a video from any site, shows me an error message. 
LaHZbHH.png

The Code:

Spoiler

 

browser = {}
browser.homepage = "https://www.youtube.com/watch?v=xcJtL7QggTI"
browser.pages = requestBrowserDomains({"www.youtube.com"})
webBrowser = createBrowser ( 1160, 740, false )

function start()
loadBrowserURL(webBrowser, browser.homepage)
addEventHandler("onClientPreRender", root, wbRender)
end

function stop()
removeEventHandler("onClientPreRender", root, wbRender)
destroyElement(webBrowser)
end

addEventHandler("onClientBrowserCreated", webBrowser,
    function()
        loadBrowserURL(webBrowser, browser.homepage)
        -- setDevelopmentMode(true, true)
        -- toggleBrowserDevTools(webBrowser, true)
        start()
    end
)

function wbRender()
        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

 

 

Edited by MrZsemle
Link to comment
  • Moderators

[HUN]

Maga az oldal betölt, szóval a script jó.

Szerintem az MTA beállításoknál neked le van tiltva a javascript futtatás.

 

[ENG]

I think the script is okay, only you ignored the javascript in your mta settings.

  • Like 1
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...