Networked Movie Player

Hey everyone!

Me and my brother have been messing around with interfacing with PlayCanvas using ClojureScript, so we made a small networked web app as a test!

It’s basically a combination of the streaming video -> texture and real-time multiplayer tutorials. The server runs on and receives packets from whoever is connected to see what time position they’re at. If there’s a difference of more than 1 second, it will send a packet back to that client with the time they should be at and the PlayCanvas client will seek to that time to synchronize with whoever else is watching. There’s also a pause and play button and working video time seek and url textbox to choose any MP4 or WebM link to play. It also bypasses CORS to work with any video link it’s given.

The app itself is written in ClojureScript, which allowed us to use a live Cider repl inside of emacs to develop the app in real-time without refreshing the page. It’s a pretty awesome way to work! As long as you’re okay with coding in lisp hahaha

Personally my brother and I really enjoy the lisp data structures over standard javascript, but in any case, PlayCanvas is a really fantastic and flexible tool! We can never stop recommending it enough.

We’ve been working on a game for a game jam recently with it as well, and we just finished implementing the Yuka AI library to that, so I’m looking forward to presenting that soon too!

Thanks for reading!