Jump to content

web browser & youtube


MAB

Recommended Posts

Posted

I want to play a youtube video in full screen.. i know how to create browser and etc.. but how to full screen the video without the player click on the full screen button?

Posted

Maybe you have to use an html file to add something like this

"1920" height="1080" src="https://www.youtube.com/embed/2vD2fO8H0fs" frameborder="0" allowfullscreen> 

Posted

You should also be able to use URL tags. For example;

"https://www.youtube.com/embed/DLzxrzFCyOs?autoplay=1" 

There are more tags you can pass through the URL as well. See this link for more information.

Posted

Thank you guys for trying to help..Dealman yours isn't working .. the html thing is here but i see nothing...i used a html file and the createBrowser function example :

meta:

     

client:

local screenWidth, screenHeight = guiGetScreenSize() 
  
--Let's create a new browser in local mode. We will not be able to load an external URL. 
local webBrowser = createBrowser(screenWidth, screenHeight, true, false) 
  
--This is the function to render the browser. 
function webBrowserRender() 
    --Render the browser on the full size of the screen. 
    dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) 
end 
  
--The event onClientBrowserCreated will be triggered, after the browser has been initialized. 
--After this event has been triggered, we will be able to load our URL and start drawing. 
addEventHandler("onClientBrowserCreated", webBrowser,  
    function() 
        --After the browser has been initialized, we can load our file. 
        loadBrowserURL(webBrowser, "http://mta/local/hal.html") 
        --Now we can start to render the browser. 
        addEventHandler("onClientRender", root, webBrowserRender) 
    end 
) 

html:

"1280" height="768" src="https://www.youtube.com/embed/5VzprYCxPBQ?autoplay=1" frameborder="0" allowfullscreen> 

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