English 中文(简体)
传真5 IE9不播放的录像
原标题:HTML5 Video not playing in IE9

在IE9中,我有了一个问题,拍摄了html5录像。

这里我如何将录像带入超文本

<video id="video-1"></video>

我指定了联合材料中一个变量的视频内容,以方便地将其用于其他职能。

video1 = document.getElementById("video-1");

这就是我如何在联合材料中播放录像。

video1.innerHTML =  <source id="video-1-mp4-src" type="video/mp4" src="  +  pill.mp4  +  ">  +  <source id="video-1-ogg-src" type="video/ogg" src=" +  pill.ogg  +  ">  +  <source id="video-1-webm-src" type="video/webm" src="  +  pill.webm  +  "> ;

Also tried this method of assigning the video in JS....

video1.innerText =  <source id="video-1-mp4-src" type="video/mp4" src="  +  pill.mp4  +  ">  +  <source id="video-1-ogg-src" type="video/ogg" src=" +  pill.ogg  +  ">  +  <source id="video-1-webm-src" type="video/webm" src="  +  pill.webm  +  "> ;

问题在于IE9的录像带上了车,我能否失踪? 或者,对IE9来说,视频标签尚未得到支持吗?

TIA! :

问题回答

在进行了大量研究之后,我提出了解决办法。

The DOCTYPE of the page must be:

<!DOCTYPE html>

(超文本5),以便IE9拍摄超文本5视频。 即使在X光照相机的情况下,Landre、Khat等也会承认视频标签,但IE还是获得。

我认为,这或许与

Confirm your Browser Mode and Document Mode. Press F12 and verify both the Browser Mode and Document Mode tabs are set to IE9 options.

令我看一看,E9能够处理内部的超文本处理,以备和提用;源码处理;内部和带;分辨率;

但是,如果你这样做的话,它就会发挥作用:

var video1 = document.getElementById("video-1");
var source = document.createElement( source );  // create source node
source.src =  pill.mp4 ;
source.type = "video/mp4";
video1.appendChild(source); // append source node to video node

对IE10和更高一级来说,你可以使用“内部超量”。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签