0

I like how SoundCloud and Vimeo have their various tabs synchronized so as soon as you start playing something in one tab, the other tabs pause. What's more interesting is that this only works on SoundCloud when two instances of the website are open, but for Vimeo this happens even between a Vimeo website tab (with the video playing) and a Vimeo video embedded on say The Verge (http://www.theverge.com/2014/12/22/7433775/watch-the-styles-of-your-favorite-directors-recreated-with-stock). However when the Vimeo video is embedded on Facebook (when I had shared it) it doesn't work.

I was wondering if one of the techniques mentioned on Javascript: sharing data between tabs is used here and if yes, why doesn't it work when the Vimeo video is embedded on Facebook and I have another tab playing Vimeo video.

Community
  • 1
  • 1
sawrubh
  • 211
  • 1
  • 4
  • 14

1 Answers1

1

So, I just inspected and indeed both SoundCloud and Vimeo use a localStorage solution. Vimeo has a key from https://f.vimeocdn.com called sync_active which updates to whichever video is playing currently or last played (if all the videos are paused). They have this key even when a Vimeo video is embedded on The Verge and hence this works there as well. However in the case of Facebook, Vimeo doesn't have any localStorage and hence no synchronization happens.

In the case of SoundCloud, it also has a key from https://soundcloud.com called V2::local::inst_<id> which gets updated to whichever tab is playing. They don't have this localStorage even when SoundCloud is embedded on The Verge and hence this only works between various SoundCloud website tabs.

sawrubh
  • 211
  • 1
  • 4
  • 14
  • As the person who implemented the soundcloud system, I can confirm that you're right. The widget doesn't stop, since it's served from a different subdomain so it doesn't share local storage. – nickf Dec 25 '14 at 23:24
  • @nickf Wow, getting a reply from the implementer feels good :) Just curious, isn't there a way for you guys to ensure synchronization for the widget too? If yes, why don't you do it? – sawrubh Dec 26 '14 at 07:20
  • The widget is actually served entirely from a CDN which is kinda nice for speed and reliability (if our data centre has problems, the widget will still play). The downside is that it must be on a different domain. The solution I think might be for the widget to include an iframe and communicate via that. Maybe that'll come later this year. – nickf Jan 03 '15 at 17:55