reddit/reddit-plugin-liveupdate — pull request #46 by umbrae (2014-03-26 19:18:23+00:00)
Title: Media embeds, take two

:eyeglasses: @spladug @chromakode

I think this one should be a good deal closer to production ready. Thanks for the feedback on the last PR.

(Sorry about the size of this. Talked with Max about it and he suggested that not splitting it up may be fine since much of it is straightforward. I can try to pluck a few things out if you like.)

Specific things to note:

1. There's now a separate queue, liveupdate_q, which supports rendering embeds async, which uses a websocket event to notify all clients to display an embed that came through.

2. Embedding things of unknown dimensions (*cough* twitter) should now work. It's a little hacky as it relies on polling but should be fine. There are approaches that may let us use events here with a bit more bloat, so we can consider that if we care to.

3. I'm now using Max's scrollupdater code to render things on the fly. :surfer:

Would love any thoughts, especially if I'm missing convention! You'll need to make sure to add the queue from https://github.com/reddit/reddit-public/pull/2098 if you're expecting it to work locally.