I have list of video files(links) stored in internal server. I need to play those video files using JavaScript and HTML. This is my code
<video width="600" id="playVideoPath" controls autoplay></video>
$scope.playVideoFile = function (row) {
var video = document.getElementById('playVideoPath');
var source = document.createElement('source');
source.setAttribute('src', row.filePath);
video.appendChild(source);
video.play();
}
but browser displays following error when i try to play file