OMAR Posted March 26, 2016 Share Posted March 26, 2016 Hi everybody! I wanted to ask whether there was a way to integrate SoundCloud to Babylon.js? I'm making game in which I want to give players the ability to choose their favorite music from SoundCloud so that it will play in the background. I tried the code below but it didn't work and also crashed my browser var music = new BABYLON.Sound("Music", "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/231224149&auto_play=true", scene, null, { streaming: true, autoplay: true }); Any ideas? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted March 26, 2016 Share Posted March 26, 2016 Your best option would be to use their API as they are not very fund of people doing such things, i believe it was possible at one point, but they changed their systems. Edit: One other way could possible be to make a small expandable html pop-over on your scene with the embeded song, instead of the babylon audio manager. Quote Link to comment Share on other sites More sharing options...
davrous Posted March 27, 2016 Share Posted March 27, 2016 This should work using streaming: true option that then uses a HTML Audio Element behind the scene. Here is a working sample: http://www.babylonjs-playground.com/#1VUVHB OMAR and meteoritool 2 Quote Link to comment Share on other sites More sharing options...
davrous Posted March 27, 2016 Share Posted March 27, 2016 And here is a version with my own music: http://www.babylonjs-playground.com/#24EA2E meteoritool 1 Quote Link to comment Share on other sites More sharing options...
davrous Posted March 27, 2016 Share Posted March 27, 2016 And finally Babylon.js Sound + Analyser + Soundcloud: http://www.babylonjs-playground.com/#15XABI#1 Enjoy. David jerome, OMAR and Wingnut 3 Quote Link to comment Share on other sites More sharing options...
OMAR Posted March 27, 2016 Author Share Posted March 27, 2016 Thank you everything works now Quote Link to comment Share on other sites More sharing options...
meteoritool Posted April 8, 2016 Share Posted April 8, 2016 Hi guys ! How have you done to get the link to your soundcloud song ? I have an account but I couldn't find any link like yours anywhere :/ How do you get the right link to stream a soundcloud song ? Quote Link to comment Share on other sites More sharing options...
OMAR Posted April 8, 2016 Author Share Posted April 8, 2016 2 minutes ago, meteoritool said: How have you done to get the link to your soundcloud song Go to your soundcloud account, click on the "3 dots button" on the upright of the page, click developers, register your app, get your client id, get your track id (by clicking embed share on the music track of your choice) and you're good to go! Take care meteoritool and Boz 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.