I am using CodeIgniter framework and JPlayer for playing video. I want video playlist will play based on playlist time in database.
So how to continuously check database time with current time? If time matched then I want start that playlist.
I want to play video according to database time. I have playlist. Playlist contains one or more than one videos. Every Playlist has date and time. So I want to play this playlist(one or more videos) according to date and time of New York time.
I know how to play playlist but I dont know how to check continuously date and time from MySQL database using PHP/JQuery and collect data and play next playlist.
PS: I am using JPlayer for playing videos/playlist. JPlayer Playlist reference: http://jplayer.org/latest/demo-02-jPlayerPlaylist/
I'm not too familiar with codeigniter, but if I had to do it in .Net I would create a DateTime object and initialize it from the database using SELECT GETDATE() ... now I will run a timer with a frequency of 1 second and do DateTimeObject.AddSecond(1) each time the timer event fires. I will also compare the timeToPlay with the DateTimeObject and if the time matches, I will run the playlist. Hope this helps