669344682

Video of html problem!

Recommended Posts

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(00, screenWidth, screenHeight, truefalsefalse)
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%;
        margin1% 0%;
        z-index2;
        
    }
    #selectionblock{
        width:100%;
        height:7%;
        positionabsolute;
        z-index:3;
        bottom:0px;
        background-colorrgba(2552552550.377);
        border-radius:5px;
 
        text-aligncenter;
    }
    </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:

unknown.png

 

 

 

 

 

 

No any debug information be reported.

Share this post


Link to post

The same problem as DGS media browser. It works in ancient MTA version....

Share this post


Link to post
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. 

你在这个论坛活跃度很高啊!:D

Share this post


Link to post
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. 

你在这个论坛活跃度很高啊!:D

Maybe video tag is broken for some reason.

我也活跃于官方discord

Share this post


Link to post

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 by botshara

Share this post


Link to post

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.