I am trying to dynamically add a video file for play.
<html>
<head> <title></title>
<script src='./jquery/jquery-1.11.2.min.js'></script>
</head>
<body>
<input type='file' accept='video/*' id='videofile' />
<video controls id='match'>
</video>
<button id='fire'>Click me</button>
<script type="text/javascript">
$(document).ready(function() {
$('#fire').click(function(event){
//alert($('#videofile')[0].files[0].name);
$('#match').append("<source src='" + $('#videofile')[0].files[0].name + "' type='video/mp4'>" );
});
});
</script>
</body>
</html>
But I am not sure of the correct procedure, since I have only the file-name but not the complete path. How could I achieve this?