mediaelement.js video by flash fallback do not autostart -
i use mediaelement.js play video fallback option flash. works fine new browsers. video autostart display page, example in ie9 ie10.
my problem: in ie7 , ie8 used fallback option play video in flash. video starts press playbutton, there no autoplay.
<video id="player2" width="480" height="270" poster="bilder/nnn.jpg" controls="controls" preload="true" autoplay="true"> <source type="video/mp4" src="media/nnn_h264.mp4" /> <source type="video/webm" src="media/nnn_h264.webm" /> <source type="video/ogg" src="media/nnn_h264.ogv" /> <object width="480" height="270" type="application/x-shockwave-flash" data="videoplayer/flashmediaelement.swf"> <param name="movie" value="videoplayer/flashmediaelement.swf" /> <param name="flashvars" value="autoplay=true&preload=true&controls=true&poster=../bilder/nnn_video.jpg&file=../media/nnn_h264.mp4" /> <img src="bilder/nnn_video.jpg" width="320" height="240" title="no video playback capabilities" /> </object>
and
<script> var player = new mediaelementplayer('#player2',/* options */); player.play(); </script>
doe's have idea? thank you!
while searching other problem find answer!
<script> $('#player2').mediaelementplayer({ plugins: ['flash', 'silverlight'], success: function(mediaelement, domobject) { if (mediaelement.plugintype == 'flash') { mediaelement.addeventlistener('canplay', function() { // player ready mediaelement.play(); }, false); } }, error: function() { alert('error setting media!'); } }); </script>
and - works!
thank xoreax for: autoplay mediaelementplayer
autoplay in firefox works me when using autoplay=true in flashvars
<object width="940" height="529" type="application/x-shockwave-flash" data="flashmediaelement.swf"> <param name="movie" value="flashmediaelement.swf" /> <param name="flashvars" value="autoplay=true&controls=true&file=file.mp4" /> </object>