在IE中使用HTML5视频的问题

时间:2013-11-02 00:05:20

标签: html5 internet-explorer video jsfiddle

我正试图让这个视频播放器在IE中工作。我已经尝试过使用video.js,但它无法处理任何事情(即使按照说明没有做到这一点)。

以下是jsFiddle示例的链接:

1 - Working example in FF, Chrome, Opera, and Safari

HTML:

<section>
    <div role="videos">
            <video controls preload width="478" height="266" poster="images/ipad-poster.jpg" id="videoPlayer">
            <source src="videos/video1.mp4" type="video/mp4">
            <source src="videos/video1.ogg" type="video/ogg">
            <source src="videos/video1.webm" type="video/webm">
        </video>
    </div><!-- end videos -->               
</section>

CSS:

div[role="videos"] {
    background: url('images/ipad_smaller.png') no-repeat;
    width: 788px;
    height: 573px;
    margin: 195px 0 0 0;
    text-align: center;
    display: inline-block;
}

div[role="videos"] video {
    text-align: center;
    margin: 140px 0 0 10px;
}

2 - video.js attempt, doesn't work in any browser

HTML:

<link href="video-js.css" rel="stylesheet">
<link href="video-js.min.css" rel="stylesheet">
<script src="js/video.js"></script>
<script>videojs.options.flash.swf = "videos/video1.swf"</script>
<div role="videos">
    <video id="videoPlayer" class="video-js vjs-default-skin" controls preload="none" width="478" height="266"  data-setup="{"controls": true, "autoplay": false, "preload": "auto"}">
        <source src="videos/video.mp4" type='video/mp4'/>
        <source src="videos/video1.webm" type='video/webm' />
        <source src="videos/video1.ogv" type='video/ogg' />
    </video>

如果我接近与否,只是希望有更多方向。

感谢。

0 个答案:

没有答案