I uploaded .mp4 and .webm video and trying to play these video using following code
<video width='407' height='240' controls preload='auto' style="margin-top:10px;">
<source src='http://www.long-alive-dev.com/web/video/<?php echo $row['demo_video_path']; ?>'>
</video>
But some .webm videos are playing and some videos are not playing, I don't understand why? Please help me how can I play all types of video in my website?
Make sure that the browser supports video format you are trying to play and also make sure that the paths are okay. Do you have a link?
<video width='407' height='240' preload="auto" autoplay loop>
<source src="yourvideo.mp4" type="video/mp4">
<source src="yourvideo.ogg" type="video/ogg">
<source src="yourvideo.webm" type='video/webm;codecs="vp8, vorbis"'>
</video>
try the following html5 code. You should provide at least two sources (recommended is three) for one video.it will work!!!