javascript - HTML5 video source will not successfully change in IE -


i'm going nuts on problem. have script changes sources of <video> tag, reloads , plays it. problem can't work on version of internet explorer.

i have array of video sources called sequence.sources, containing:

sequence.sources = ['video.webm', 'video.mp4', 'video.ogv']; 

the sequences object loaded array, that's dynamic aspect of all. function use change video sources follows:

var videoelem = document.getelementbyid('video');  // remove sources while (videoelem.firstchild) {     videoelem.removechild(video.firstchild); }  // add new sources (var = 0; < sequence.sources.length; i++) {    var srcelem = document.createelement('source');    srcelem.setattribute('src', sequence.sources[i]);    videoelem.appendchild(srcelem); }  // initiate video videoelem.load(); videoelem.play(); 

this works on browsers ie. do? i've tried modifying src attribute of <video> tag directly, doesn't seem work. i've tried removing entire <video> tag , adding new 1 updated sources. no cigar.

this possibily off topic, i'm considering possibility must add .htaccess hack make work. suggestions appreciated.

my final thought sources except first 1 somehow faulty , won't played. there way can check compatibility ie?

edit: network tab on developer tools give me 206 partial result of http request. highly encoding compatibility issue. close question if proves case.

the problem create source nodes , try change src attribute. not work in ie. instead use src attribute. complete solution can found in post here: https://stackoverflow.com/a/7905151/818732 ... try google such things , add "stackoverflow" best results.

by way: have ever tried adding mp4 file directly attribute (in html code)? if yes , still not work check if server returns correct mime-type .mp4 files (video/mp4).

last not least - utilize caniuse.com check browser support. starters, here link mp4s: http://caniuse.com/mpeg4


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -