I program a stream of youtube videos that should play according to a set schedule, like a TV. If you enter the website, the video stream must be taken on any video in the schedule. Therefore, and not a playlist set to order a video, this is a video schedule.
I started to encode it as a list of youtube ID codes, video length and video playback time. In fact, the program checks the current time, and then finds the video closer to that time. Then he will find the difference between the current time (in real time) and the time at which the video should be played, and thus speed up the rewinding of this time difference in the video.
Is this a dumb way to do this? I am writing in PHP. I feel that there is a better way to do this than to manually enter all the information into the list. And also, is there any other way to say playing this NOW and no matter who opens it, this is the current video that needs to be played. A cron task that updates every x minutes, checks the current video and saves it, and then plays that video?
Hope you guys could help me with this logic.
Thanks!
Daniel Fein
source share