mp4视频无法在Internet Explorer 9上播放

时间:2015-02-02 09:41:30

标签: html5

mp4视频未播放且在Internet Explorer 9中显示红叉。 它在chrome中运行良好

问题类似于此处发布的问题: HTML5 video plays in chrome but not IE9

但解决方案尚不清楚

请帮忙!提前致谢

CODE:

 <video width="520" height="540" controls="true" id="mp4Vid" >
        Your browser does not support the video tag.
        <param name="allowfullscreen" value="true">  
        <param name="allowscriptaccess" value="always">  
        <param name="flashvars" value="file=/mov/scene.mp4">  
        <source type="video/mp4" id="source" />
    </video>

视频源使用以下javascript代码加载

 var video1 = document.getElementById('mp4Vid');
 var source = document.getElementById('source');
        source.setAttribute('src', "myMp4.mp4");
        source.setAttribute('type', 'video/mp4');
        video1.pause();
        video1.appendChild(source);
        video1.load();
        video1.play();

0 个答案:

没有答案