Embed a SoundCloud player in a shared HTML page
A demo page, press kit or mix page from Claude or ChatGPT with a SoundCloud player in it. Which iframe address works, which heights to use, what a wrong ID shows, and how to share the page as a link.
Ask Claude or ChatGPT for a page with a SoundCloud track or playlist and it writes an <iframe>. Whether the player shows depends on the address in src.
The tests below were run in headless Chrome, signed out of SoundCloud, with a public track and a public playlist, on a page served over http and on the same file opened from disk.
Use the widget address
The src goes to w.soundcloud.com/player/ with the track in the url parameter: https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/TRACK_ID. Tested in an iframe:
- ✓w.soundcloud.com/player/?url=…/tracks/ID: the player loaded with artwork, title, waveform and a Play button, over http and from a file:/// address.
- ✓w.soundcloud.com/player/?url=…/playlists/ID: the player loaded with the playlist's track list under it.
- ✓w.soundcloud.com/player/?url=https%3A//soundcloud.com/ARTIST/TRACK (the normal track link inside the url parameter): loaded the same player.
- ✓soundcloud.com/ARTIST/TRACK as the src itself: a grey frame with a broken-page icon. The page sends X-Frame-Options: SAMEORIGIN, so only SoundCloud can frame it.
- ✓A track ID that does not exist: "Oops, we couldn't find that track." inside the frame.
Pick a height
SoundCloud's embed code (Share, then Embed) gives height 166 for the classic track player, 400 or more for the visual player (visual=true in the address) and 450 for a playlist. Tested: at 166 the classic player showed artwork, waveform and Play; the visual player at 166 still worked but cropped the artwork; at 450 the playlist showed the current track and the list below it.
Copy the code from SoundCloud to get the height, width="100%" and allow="autoplay". The color, show_comments and hide_related parameters in that code change the look only.
Signed out, the player showed the full track length. Playback rules for tracks that need a SoundCloud Go subscription were not tested.
Control the player from your page
SoundCloud's Widget API (the script https://w.soundcloud.com/player/api.js) wraps the iframe with SC.Widget(iframe) and lets your page play, pause, skip and read the current track. Tested: the READY event fired and getCurrentSound returned the track title, over http and from disk.
To get this from an AI tool, ask: "Embed the SoundCloud track with an iframe at https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/TRACK_ID, height 166, width 100%, allow autoplay."
Upload it and send the link
Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account on FileShare Pro. The shared view allows autoplay, encrypted-media, fullscreen and clipboard-write for your page, so the SoundCloud player inside it gets the autoplay permission it asks for.
Change the page and upload a new version over the old one; the link stays the same. Related: a Spotify player in a shared page, a page with an audio player and a Vimeo video in a shared page.
Frequently asked
Yes. The track player, the playlist player and the Widget API all worked from a file:/// address in the test.
No. The audio stays on SoundCloud; only the HTML file is uploaded.
No. Shared files carry a noindex header: keeping a preview out of Google.
Drop the file, copy the link — live in seconds, free plan included.
Start sharing free