视频未加载/ html5

时间:2017-02-17 23:24:25

标签: html5 web html5-video

我有一个让我疯狂的问题,我不知道还能做什么。我从pixelarity dot com购买了模板“Formula”。在演示中,该网站在后台循环播放视频。但是,下载版本的背景具有不同的视频(命名横幅)。我将我要播放的视频复制到images文件夹(.mp4和webm格式)并更新代码,如下所示,我的视频名称为“forwes”但是当我预览页面时它没有加载(它仍然播放下载附带的视频。

为什么在加载页面时不播放的想法?请记住,我是网页设计和编码的菜鸟

谢谢!

                排除文件扩展名。模板将自动生效                     在支持背景视频的平台上生成多格式*标签,然后跳过                     踩到那些不这样做的东西(落在你设置为背景图像的任何东西上)。

                * Your video must be offered in both .mp4 and .webm formats to work everywhere.
            -->
                <section id="banner" data-video="images/forwes">
                    <div class="inner">
                        <header>
                            <h1>Our Business Name</h1>
                            <p>W we will repair your computers, phones, printers and all other electronic devices. <br />  We provide both in-store support as well as provide full service, onsite IT support for businesses. Contact us for your free consultation today!.</p>
                        </header>
                        <ul class="actions">
                            <li><a href="#" class="button special big">Get Started</a></li>
                        </ul>
                    </div>
                    <a href="#one" class="more">Learn More</a>
                </section>

1 个答案:

答案 0 :(得分:0)

尝试使用正确的视频格式和标签

&#13;
&#13;
.container{
margin: 30px auto;
display:block;
max-width:1200px;
}
&#13;
<div class="container">
  <video class="video" poster="" id="bgvid" playsinline autoplay muted loop>
            <!-- WCAG general accessibility recommendation is that media such as background video play through only once. Loop turned on for the purposes of illustration; if removed, the end of the video will fade in the same way created by pressing the "Pause" button  -->
            <source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
            </source>
            <source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">
            </source>
            <source src="http://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
            </source>
        </video>
</div>
&#13;
&#13;
&#13;