B
B
bgr11n2015-10-22 18:22:37
YouTube
bgr11n, 2015-10-22 18:22:37

How does plug.dj or similar sites work?

Good afternoon!
Recently wondered how the site plug.dj worked? For those who do not know, this is a service that allows you to create a playlist through youtube that plays like streaming.
For example, when a new user enters a page with a playlist, his video starts playing not from the beginning, but from the place where the current song is left to listen to.
Here I wonder what technologies are needed to implement this.
Thanks in advance for your replies!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Litvinenko, 2015-10-22
@bgr11n

there is a whole layer of options on how to do this.
For example, a YouTube playlist can be obtained through their api, such services often have an api, google services api is very functional but complex.
There are a couple of ways to memorize a track.
Write position in cookies\localstore
Send info to server via jax\sockets
Write time in address bar via history api.
Of all the options, sockets seem to me the most beautiful (WebSocket, or Long Polling, or Comet). Sockets will allow you to synchronize one playlist for each user, across devices or browsers, and much more.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question