Settings

Theme

Show HN: WeTube. Sync YouTube player across multiple devices

wetube.glitch.me

11 points by redraw 6 years ago · 7 comments

Reader

Fr33maan 6 years ago

Back button just refresh the page on android, very annoying.

  • redrawOP 6 years ago

    Sorry. Worked on mine, we must be testing on different browsers/versions, but it might have to be that root path pushes Vue's router to a shareable URL.

sansnomme 6 years ago

What's the stack? You should do a blog post!

  • arkits 6 years ago

    You can view the source here - https://glitch.com/edit/#!/wetube. Quite nicely done!

    • redrawOP 6 years ago

      Hey thanks! right, that's the link. It's hosted on glitch so you can see/edit/fork it.

      I've tried to keep it simple, but couldn't improve latency anymore. No matter if it's using socket.io or some faster network transport, there will be some latency. So I've used server's time as reference for clients to adjust the player's current time across devices.

      However, there's still a delay added by the YouTube player when triggering the play action. It's an async action, and YouTube's embed player API _seekTo_ method seems to be rounding or not updating if the player is already playing in the nearby time. I'm not sure what else to do to achieve a perfect sync.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection