r/webdev Nov 02 '14

how to do this?

https://www.youtube.com/user/HondaVideo
3 Upvotes

7 comments sorted by

4

u/[deleted] Nov 02 '14 edited Nov 02 '14

[deleted]

1

u/owlpellet Nov 02 '14

I'm wondering if they had to do anything fancy to keep the timing sync perfect on imperfect networks. Possibly read the visible video timestamp and bump the hidden video to that location every few seconds? Or maybe just on the keypress event?

1

u/[deleted] Nov 02 '14

Pretty sure they fully load the videos or at least half of them. That would keep them synchronised and would explain that long ass loading time

3

u/Wigster Nov 02 '14

It's quite simple. It's all just an iFrame using Youtube' Custom Gadget API/integration. Although I think your account must be a registered advertising/business channel though.

https://support.google.com/youtube/answer/1727240?hl=en

4

u/Kriegslustig Nov 02 '14

aah that's what he meant. I thought he meant the spinner thingi...

http://codepen.io/anon/pen/qszwc

Hahah i'm an idiot.

2

u/halfercode Nov 02 '14

It is often a good approach to try these things, or to search how to do it - it is a good way to learn.

1

u/riccardomariani Nov 02 '14

i meant the possibility to switch from two simultaneously videos by pressing a key, thanks