react-player
react-player copied to clipboard
Soundcloud Private embed src link does not work.
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
- Upload an audio via SoundCloud and mark it as private
- Copy generated src URL for embed links.
- 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 Can you post an example of a private embed URL? Even if you change the secret token to something else.
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
The link below doesn't work. Seems like it is related. Any ideas how to fix it?
-
https://soundcloud.com/user-961206191/exercise-1-learning-how-to-relax-heart-mind-relaxation-exercise/s-xgOUpletYTx?si=4bcfe9479c1d4271802131ea3d632944
-
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
-
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
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