Is there any errors in the html5 video element? it doesn't keep playing content after a few hours
I need to play video content 24/7, its idle movie keeps playing like a loop. But after hours with no activity on PC, suddenly the video stops playing like a loop. It has been tested with Google chrome / Canary with the latest available on Windows 8.1 64-bit machine.
As shown below:
<video id="mediaplayer"
autoplay="autoplay"
poster="/images/blackscreen.jpg"
type="video/webm"
loop="true"></video>
<script>
var video_idlea = 'http://localhost/loop.mp4';
function video_idle() {
$('#mediaplayer').prop('loop', true);
$('#mediaplayer').attr('src', video_idlea).show();
mediaplay_video= document.getElementById('mediaplayer');
mediaplay_video.play();
mediaplay_video.onended = function(e) {
console.log('>>> Playing finished: ', e);
};
}
function video_play_any(input) {
$('#mediaplayer').prop('loop', false);
$('#mediaplayer').attr('src', input).show();
mediaplay_video= document.getElementById('mediaplayer');
mediaplay_video.play();
mediaplay_video.onended = function(e) {
console.log('>>> Playing finished: ', e);
video_idlea = 'http://localhost/idle.avi';
video_idle();
};
}
video_play_any('http://localhost/loop.mp4');
</script>
Am I doing something abnormal here? he has to keep playing endlessly, right? or am I doing something wrong here? Please advise.
+3
source to share