cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
9.41k stars 1.15k forks source link

Add support for Spotify & Google Music #161

Closed wewelll closed 7 years ago

wewelll commented 7 years ago

Hi,

I'm interested in streaming Spotify and Google Music tracks with this library. Is this in any of your plans ? Do you have any advise if I want to develop the feature ?

Cheers, Samuel

cookpete commented 7 years ago

The closest thing we have for Spotify is the Spotify Play Button, which is just a very basic iframe player. All we can do is render an iframe and no other ReactPlayer props/interactions would work. They say an API is on the way:

The Play button doesn’t have any observable events, nor does it listen for any. Playback can only be triggered by the user clicking the button.

We’re certainly looking at creating a JS SDK; it’s a bigger project and right now we’re focusing on quickly releasing APIs to open up the general Spotify ecosystem (catalogue, playlists, etc).

None of these requests are falling on deaf ears, and we’re working hard to bring out as much functionality as we can.

Is it worth adding "support" for Spotify URLs even if it involves just rendering an iframe with no interactions/events?

Also, it doesn't looks like Google Music has an API we can use. All I can find is unofficial proxies/hacks.

wewelll commented 7 years ago

@CookPete In the meantime I also looked at which APIs we could use, and I got the same results as you.

I hope Spotify is indeed working on a JS SDK :)

wewelll commented 6 years ago

@CookPete

It looks like we have something promising for Spotify https://beta.developer.spotify.com/documentation/web-playback-sdk/

cookpete commented 6 years ago

@samuelbriole Good spot! I'll look into adding support for this.

rasjonell-zz commented 5 years ago

hey @CookPete, we've been using react-player for some time and we're really happy with it. I came across this issue and saw that there is a branch for adding Spotify support and was wondering what state it is in? will it be merged into master any time soon?

vincentwinkel commented 1 year ago

Some update about the spotify integration ? I'm using react-player for youtube, soundcloud etc, and I'm trying to integrate spotify aside. Not so easy because of the auth, but as fallback their sdk provides a preview_url (the 30s free snapshot). Unfortunately, even those urls cannot be played using react-player. Eg. https://p.scdn.co/mp3-preview/0ed0e3241d7dd381271156710b7153308ddfbb89