javastreamcloudmovie

Synchronized streaming


I am working on website to upload movie and watch with others. Also, I am working on cloud. Until know I did how upload movie and stream it on website but I`m thinking if end-user want to watch movie in synchronizing way, how could I do that? I mean, If I want watch movie with my friend, in two different location and both of us can play movie or pause it at a same time...

Do you have any idea?


Solution

  • Let's assume the client is a webbrowser.

    You'd have to keep both (or all) clients in sync.

    You cannot really initiate communication from the server, so your clients need to periodically "ask" the the server (maybe using AJAX) something similar to "should the movie be playing right now?" and take the accoring action on the client (which are using JavaScript perhaps?).

    You could put this as a property in an object on the server to which all clients have access. You'd need to figure out how to share that object amongst all client sessions.