react-player icon indicating copy to clipboard operation
react-player copied to clipboard

Soundcloud Private embed src link does not work.

Open eddyfabery opened this issue 3 years ago • 4 comments

Be sure to search for your issue before opening a new one.

Current Behavior

  • Current soudcloud iframe src does not account for secret_token={} param
  • ReactPlayer does not handle private embedable links

Expected Behavior

  • Play private embedable SoundCloud Links

Steps to Reproduce

  1. Upload an audio via SoundCloud and mark it as private
  2. Copy generated src URL for embed links.
  3. Use embed link url and pass it to ReactPlayer as url prop

Environment

  • URL attempting to play:
  • Browser:
  • Operating system:
  • jsFiddle example: https://jsfiddle.net/sv5x3ug1

Other Information

Missing parameter here

eddyfabery avatar Mar 08 '21 20:03 eddyfabery

@eddyfabery Can you post an example of a private embed URL? Even if you change the secret token to something else.

cookpete avatar Mar 10 '21 09:03 cookpete

The embedded URL is changed a bit now the URL part includes "api" at front due to which the player doesn't loads the link also I checked the REGEX for sound cloud it matched from soundcloud.com..... ignoring the "api" part

papuruth avatar Oct 07 '21 07:10 papuruth

The link below doesn't work. Seems like it is related. Any ideas how to fix it?

  1. https://soundcloud.com/user-961206191/exercise-1-learning-how-to-relax-heart-mind-relaxation-exercise/s-xgOUpletYTx?si=4bcfe9479c1d4271802131ea3d632944

  2. In react-player it is embedded with this url: https://w.soundcloud.com/player/?url=https://soundcloud.com/user-961206191/exercise-1-learning-how-to-relax-heart-mind-relaxation-exercise/s-xgOUpletYTx&visual=true&buying=false&liking=false&download=false&sharing=false&show_comments=false&show_playcount=false&callback=true

  3. If using oembed (https://soundcloud.com/oembed?url=https://soundcloud.com/user-961206191/exercise-1-learning-how-to-relax-heart-mind-relaxation-exercise/s-xgOUpletYTx?si=4bcfe9479c1d4271802131ea3d632944) Can get this url, that works https://w.soundcloud.com/player/?visual=true&url=https://api.soundcloud.com/tracks/1166472646&show_artwork=true&secret_token=s-xgOUpletYTx

shaulgo avatar Dec 02 '21 15:12 shaulgo

ok if someone else has this problem:

typical URL format : https://soundcloud.com/ARTIST/sets/PLAYLIST_NAME/SECRET_TOKEN

You will need to go to the iframe embed code for the playlist, or the oembed url as in @shaulgo comment and get the PLAYLIST_ID

change the URL to this: https://api.soundcloud.com/playlists/PLAYLIST_ID?secret_token=SECRET_TOKEN

symbiosdotwiki avatar Jul 08 '23 21:07 symbiosdotwiki