I am using jw player on my site and I would like to know what is the correct way to play random .mp4 video files when you press the play button I have included the code that i am using on my site to play just one .mp4 file, I have a folder with several .mp4 video files that I would like to randomly play on the press of the play button when a user visits my page.
my folder has videos labeled hdvideo1.mp4,hdvideo2.mp4 etc....
jQuery(document).ready(function($){
$(".vid-play-img").click(function() {
$( "#daOverlay" ).show();
jwplayer('jplayer').setup({
logo: false,
file: '/hdvideo4.mp4',
image: "{{ $title->background }}",
width: "100%",
aspectratio: "16:9",
autostart: true,
controls: false
});
});
});
↧