Hi, i´m trying to do a quiz game using video, the idea is to put a video of a character; over the video there is a layer with buttons where i get the input from the user,
i want to make intros where diferent videos are loaded and the idea is that, when a video finish, there will begin another one,
i´m having a lot of troubles doing this, the problem is that if i´ve got two videos and a timer to determine when the second video must begin, all the php instructions are executed secuentially, so, the server sends the video to the client, the client try to load the video but there is still no video, so a message appears that no video is found, at almost the same time, the timer has allready begun to tick, so at 'x' seconds the instruction to load the second video is executed having the same problem, the video is not in the local machine so it fails to load.
I´m not quite sure how can i solve this problem, i´ve allready search and find that there is a solution for threads in php, the pcntl fuction, but it just work for console aplications, not in web side aplications so i´m getting out of ideas.
the whole game uses php, js, json, mysql to store all the information of the characters and user information, jquery and basically it loads videos and recover the user inputs.
thanks a lot for the help, if you have any idea of how could i resolve this problem i really would appreciate it!!