Synchronizing video between players in webgl

Options
Hi all,

I am trying to get a video to start and play for all players at the same time once a button is pushed. Has anyone tried this? What would be the best way to do this?

Thanks so much.

Comments

  • Tobias
    Options
    This is possible and a simple trick is to use the ServerTimestamp. When the button is pressed, get the timestamp, add a little delay time to it and set it as "vst" (video start time) in a property. Anyone can read it and calculate (relatively precisely) when the video started.

    The ServerTimestamp is per server and not a datetime. It will overrun but as long as you calculate time differences (now - vst) this is fine.
  • TwistedMajic
    Options
    Thank you so much for your response. That does sound good. So I would just call a global that would play the video in the server?
  • TwistedMajic
    Options
    Would it be possible to get a code example of how you would do that?
  • Tobias
    Options