How can you make the video playback very random? (right now it's playing after French, Nederlands and after Nederlands, French, but I want randomly shuffle out of this two)
var playing ='FR';
function video_idle() {
$('#mediaplayer').attr('src',playing + '.mp4' ).show();
mediaplay_video= document.getElementById('mediaplayer');
mediaplay_video.play();
mediaplay_video.onended = function(e) {
console.log('>>> Playing finished: ', e);
if(playing ==='FR') {
playing='NL';
video_idle();
} else {
playing='FR';
video_idle();
}
};
}