.:HyPeX:. Posted December 23, 2015 Share Posted December 23, 2015 Well i've tried this out, but i cant get somewhat CEF to load the video. Tried loading a basic HTML page locally, and drawing it, but it will be somehow drawn blank.. PD: No errors in debug local browser = createBrowser(x,y,true,false) addEventHandler("onClientBrowserCreated", browser, function() loadBrowserURL(browser, "http://mta/local/html/file.html") end ) function BackGroundDrawing() dxDrawImage(0,0,x,y, browser,0,0,0) end addEventHandler('onClientRender', root, BackGroundDrawing,true, "high+6") HTML file: <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html> Link to comment
.:HyPeX:. Posted December 23, 2015 Author Share Posted December 23, 2015 Okay, this is driving me nuts, for some reason the CEF wont load my mp4 file and just go blank. Also seems like texts are way small. http://i.imgur.com/R6eOcO9.png http://i.imgur.com/HORPAR2.png <!DOCTYPE html> <html> <body> <button onclick="playVid()" type="button">Play Video</button> <button onclick="pauseVid()" type="button">Pause Video</button><br> <video id="myVideo" width="320" height="176"> <source src="emp.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> <script> var vid = document.getElementById("myVideo"); vid.autoplay = true; vid.load(); function playVid() { myVideo.play(); } function pauseVid() { myVideo.pause(); } </script> <p>Video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p> </body> </html> Link to comment
.:HyPeX:. Posted December 24, 2015 Author Share Posted December 24, 2015 Anyone knows how to make this work? probably an error with the video source load path? i tried using the scheme offered by MTA (http://mta) but that wouldnt work either Link to comment
Jusonex Posted December 25, 2015 Share Posted December 25, 2015 The MPEG-4 codec is not supported due to licensing issues. Convert the video to a free codec like WebM or OGG (WebM compresses better though). Link to comment
.:HyPeX:. Posted December 25, 2015 Author Share Posted December 25, 2015 The MPEG-4 codec is not supported due to licensing issues. Convert the video to a free codec like WebM or OGG (WebM compresses better though). Alright, thanks for that! Honestly i was already about to give up on this, but i guess i'll try doing that. The file path should be the one http://mta/etc for the video path? 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