0

In following Code, autoplay="false" preload="none" set but still Video is auto playing.

Where is the problem?

What I am missing?

new_video = document.createElement('video');
new_video.setAttribute('controls','true');
//new_video.setAttribute('autoBuffering','true');
new_video.setAttribute('preload','none');//autoPlay: false, 'preload':'auto'
new_video.setAttribute('autoPlay','false');
//new_video.setAttribute('type','video/mp4;codecs="vp8, vorbis"');
video = document.getElementById('RIZfC358yRk').appendChild(new_video);
source = document.createElement('source');  
source.setAttribute('src','https://dl.dropboxusercontent.com/u/87532981/Ella%20May%20and%20the%20Wishing%20Stone%20By%20Cary%20Fagan.mp4');
video.appendChild(source);
video.load();
video.play();
4

1 に答える 1

2

「autoPlay」の代わりに「autostart」属性を使用してみてください。

new_video.setAttribute('autostart','false');

最後の行を削除し、

video.play();
于 2013-09-20T16:42:27.813 に答える