'Best way to sync video playback on multiple devices using NodeJS and websockets
I am trying to sync video playback across a set number of devices. Each device will play one section of the video, creating one large video playback made up of individual devices. As shown here:
Currently, I have this working fairly well using nodeJS with socket.io. My solution was to set the top left device as the master client device. From the master, I am sending the currentTime of the video to the server where it is broadcasted to the rest of the devices. On the remaining three devices, I am using the master video currentTime to slow or speed up it's video to match the master device video. This works, however, you can sometimes notice that the master video is slightly ahead of the other videos. With this solution, it takes a lot of fine-tuning to get it right.
I am wondering if there's a better way to do this. Would it be more efficient to stream each video from the server to the corresponding device? The app will eventually work with any set grid dimension so streaming-only 4 videos as shown here will not always be the case.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

