Jump to content

Help MTA Browser


smw94

Recommended Posts

Posted

i have a problem, i created a browser, that load youtube, i set the browser property, "mobile" into "1" (enabled)

but i cant play youtube videos, if i disabled mobile property, i can play videos, any help ? thanks

here's some my code:

theBrowser = guiCreateBrowser(24, 80, sizeX, sizeY, false, false, false, wPhoneMenu) 
    setBrowserProperty(guiGetBrowser(theBrowser),"mobile","1") 

Posted
Hmm, maybe it's a bug.

Did you use injectBrowserMouseUp/Down functions?

hmm, no i dont, if i load youtube as a normal browser, without mobile property enabled i can play the videos normally ..

Posted

What do you actually mean by playing videos? If you didn't inject the mouse clicks yet;

addEventHandler("onClientClick", root, 
    function(button, state) 
        if state == "down" then 
            injectBrowserMouseDown(theBrowser, button) 
        else 
            injectBrowserMouseUp(theBrowser, button) 
        end 
    end 
end 

Posted
What do you actually mean by playing videos? If you didn't inject the mouse clicks yet;
addEventHandler("onClientClick", root, 
    function(button, state) 
        if state == "down" then 
            injectBrowserMouseDown(theBrowser, button) 
        else 
            injectBrowserMouseUp(theBrowser, button) 
        end 
    end 
end 

still doesnt work, when i click the videos, it wont play ..

but if i set the browser property non mobile, when i click the videos, it play ..

  • 3 weeks later...
  • 3 months later...
Posted
I had this problem some time ago

you have to use injectBrowserMouseMove before inject clicks.

how you use that ?

i use this, and still not working

  
function onCursorMove ( relativeX , relativeY , absoluteX , absoluteY ) 
    if webAppsWdw then  
        injectBrowserMouseMove ( webAppsWdw , absoluteX , absoluteY )  
    end 
end  
addEventHandler ( "onClientCursorMove" , root , onCursorMove ) 
  

Posted

You don't need to call the injectBrowser* functions if the browser was created using guiCreateBrowser.

The problem is that YouTube uses the RTSP protocol to stream videos on mobile devices. I guess requesting a rtsp:// URL opens the fullscreen view then.

Unfortunately, Chromium doesn't support RTSP streams, so you can't use the mobile version of YouTube in CEF.

As an alternative, try the TV app https://youtube.com/tv

Posted
You don't need to call the injectBrowser* functions if the browser was created using guiCreateBrowser.

The problem is that YouTube uses the RTSP protocol to stream videos on mobile devices. I guess requesting a rtsp:// URL opens the fullscreen view then.

Unfortunately, Chromium doesn't support RTSP streams, so you can't use the mobile version of YouTube in CEF.

As an alternative, try the TV app https://youtube.com/tv

it's exactly what i wanted, thanks for the suggestion, and it now working :D

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