mp4 video not playing on iphone

六眼飞鱼酱① 提交于 2021-01-28 12:31:13

问题


I have a mp4 video to automatically play on website, but it doesn't play on iphone. Referring to other Q & A about the same issue, I added "playsinline" to the video tag.

However it doesn't seem to work and nothing is displayed on the screen of my iphone.

Could anyone help me find out what is wrong with my code?

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        body {
            background: #ffffff;
            padding: 0;
            margin: 0;
        }

        video {
            width: 500px;
            height: 500px;
        }
    </style>
</head>

<body>

    <video autoplay loop muted playsinline class="video-background ">
        <source src="video01.mp4" type="video/mp4">
    </video>
    </div>
</body>

</html>

来源:https://stackoverflow.com/questions/55701447/mp4-video-not-playing-on-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!