Is it possible to make so that the video played at the same time on two computers ?
If the video lagged on one side, then the other must wait.
Is it possible to make so that the video played at the same time on two computers ?
If the video lagged on one side, then the other must wait.
You'll need to keep track of where each user is in the video. To get the current position:
var currentPos = document.getElementById("myVideo").currentTime;
And post them to your server for each user's session. Then, keep comparing the two times and if one gets over a few seconds ahead, send a pause command to the one that is ahead.
The specifics of how to do this will depend strongly on your server-side setup and how you're maintaining sessions for users.