Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do soundcloud keep music playing on when navigating?

I'm wondering how soundcloud can play music seamlessly when navigating between pages. It's possible that they use Ajax cuz the top bar seems not to reload when navigating but i see the URL changes. Is there any way to load content using Ajax and set the URL to another one?

like image 407
KwiZ Avatar asked Aug 28 '13 03:08

KwiZ


People also ask

How do I keep SoundCloud playing?

Clicking on the icon and turning it orange will activate 'repeat'. The song will repeat until you uncheck the icon. You can also press 'SHIFT + L' on your computer's keyboard to turn the repeat button on.

Does SoundCloud play in the background?

The SoundCloud app, which you're meant to play in the background, has ads that WON'T play in the background, and they can appear even if you're listening to music in the background, meaning it just stops your music so an ad can (not) play.

How do I make SoundCloud play automatically?

Customize your player You also have the option to turn on autoplay by clicking the box next to 'Enable automatic play'. By doing this, your embedded player will play as soon as your website or blog's page is loaded.

How do you turn off continuous play on SoundCloud?

You can disable or enable app playback through the track's edit page in the 'Permissions' tab. You can access this edit page at any time through the pencil icon under it's waveform.


1 Answers

HTML5 has introduced a new API, called HTML5 History API. You can read about using it here – http://diveintohtml5.info/history.html

This API lets you update browser address bar with JavaScript, so you can change the contents of the page according to the URL. The use of AJAX doesn't really have to do with UI changes, you could check the networks tab in Chrome's developer tools to see that requests are issued with XHR.

like image 90
Misha Reyzlin Avatar answered Sep 18 '22 01:09

Misha Reyzlin