I have done a script that displays only an image of a the video when the user uploads one. The thing is that i want the video to start when the users clicks on the image but now when the user clicks the video appears with no autoplay.
here is the code
<div class="img_container"> <a href="#." id="video_thumb_<?php echo $id;?>" style="display:block;"
onClick="javascript:loadVideo(\'<?php echo $id;?>\')"> <img src='<?php echo $my_thumb;?>' class="imgpreview" /> </a> <div style="display:none;"
id="video_<?php echo $id;?>"?autoplay="1"></div>';
<script>
function loadVideo(input){
document.getElementById("video_thumb_"+input).style.display="none";
document.getElementById("video_"+input).style.display="block";
}
</script>