Zed159

playSound3D

Recommended Posts

Hello community.

Anyone here has an idea of how to play Youtube or mp3 links in Speakers? 

Share this post


Link to post

By using playSound3D you have to use a direct link to the audio source, for example a link that ends with ".mp3"

Accepted formats: MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M.

And about youtube, You can not do it directly but I believe there's a work around, some APIs could convert youtube links into MP3 links then you may play them.

  • Like 1

Share this post


Link to post

You can use a youtube api converter to convert youtube videos into mp3 files, however generally these api's only convert music videos. To do this you'd need to do whats called string parsing. Where you take the youtube url and change the string a bit to match what the api needs in order to work, these api's are called web api's and can be used using fetchRemote however it is not ideal because it requires each player to verify access to the url. Alternatively you can use/make your own api with something like nodejs that I don't know much about, but it is a faster, more flexible alternative.
There is one other way that doesn't require api's or verifying urls, you can run a browser to a youtube link to play the sound however you'd have to find some way to sync it up with other players and also check the distance between the player or where you created the sound and the elements around it for that 3d effect. I hope this helped, good luck to you mate.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.