China_Yann Posted September 11, 2019 Share Posted September 11, 2019 meta.xml: <meta> <!-- exports --> <script src= "win.Lua" type = "client" /> <!-- main scripts --> <script src= "client.Lua" type = "client"/> <script src= "server.Lua" type = "server"/> <file src="interface/index.html" /> <file src="interface/assert/logo.png" /> <file src="interface/assert/movie.webm" /> <oop>true</oop> </meta> client.Lua: local screenWidth, screenHeight = guiGetScreenSize() local page = "http://mta/srp_account/interface/index.html" local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false) local theBrowser = guiGetBrowser(initBrowser) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, page) showCursor(true) end ) index.html: <!DOCTYPE HTML> <head> <style> body{ margin:0px; padding:0px; background-color:black; } #background-video{ width:100%; height:100%; margin:0px 0px; position:fixed; z-index:1; } #logo{ position:absolute; width:100%; height:45%; margin: 1% 0%; z-index: 2; } #selectionblock{ width:100%; height:7%; position: absolute; z-index:3; bottom:0px; background-color: rgba(255, 255, 255, 0.377); border-radius:5px; text-align: center; } </style> </head> <body> <div id="main"> <video id="background-video" autoplay loop muted controls><!--chrome播放需要加muted静音--> <source src="http://mta/srp_account/interface/assert/movie.webm" type="video/webm">your browser does not support the video tag.<!-- http://mta/srp_account/interface/assert/movie.mp4 http://mta/srp_account/interface/assert/movie.webm--> <!--<source src="assert/movie.webm" type="video/webm">your browser does not support the video tag.--> </video> <img src="assert/logo.png" id="logo"/> </div> <div id="selectionblock"></div> </body> The video cannot play when the resource start. I work successfully with the same code before I transfer my system disk. Please help me error screenshot: No any debug information be reported. Link to comment
Scripting Moderators thisdp Posted September 11, 2019 Scripting Moderators Share Posted September 11, 2019 The same problem as DGS media browser. It works in ancient MTA version.... Link to comment
China_Yann Posted September 12, 2019 Author Share Posted September 12, 2019 12 hours ago, thisdp said: The same problem as DGS media browser. It works in ancient MTA version.... Actually, 1.5.6 works well, I guess It's might be a bug of latest version and have reported this error to github. 你在这个论坛活跃度很高啊! Link to comment
Scripting Moderators thisdp Posted September 12, 2019 Scripting Moderators Share Posted September 12, 2019 5 hours ago, 669344682 said: Actually, 1.5.6 works well, I guess It's might be a bug of latest version and have reported this error to github. 你在这个论坛活跃度很高啊! Maybe video tag is broken for some reason. 我也活跃于官方discord Link to comment
botshara Posted September 12, 2019 Share Posted September 12, 2019 (edited) I have also the same problem, but with images... After 1.5.7 client update it broke. In my case, It broke when load file from different resource, if load from local resource then no problem. -- WORKS http://mta/local/avatar.png -- BROKEN http://mta/cache/avatar.png Edited September 12, 2019 by botshara 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