Active
Project:
Drupal core
Version:
main
Component:
media system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Mar 2022 at 06:47 UTC
Updated:
25 Nov 2026 at 22:11 UTC
Jump to comment: Most recent
Out of the box, if you add a remote audio item from Soundcloud, the iframe showing it is 100px wide.

This isn't exactly a bug, because everything works as expected, but it looks odd, and it is may not be immediately obvious how to fix it.
This can be addressed by the following steps:
1. go to /admin/structure/media/manage/remote_audio/display
2. click the cog to edit the oEmbed settings
3. select a maximum width e.g. 800px
Strangely, the Spotify iframe looks fine -

1. enable the module
2. add a Soundcloud item, e.g. https://soundcloud.com/dj-jo-public/jo-public-logical-obsession-09-dec-2...
tbc - possibly just documentation?
| Comment | File | Size | Author |
|---|---|---|---|
| spotify.jpg | 26.35 KB | malcomio | |
| soundcloud-100px.jpg | 73.53 KB | malcomio |
Comments
Comment #2
chris matthews commentedComment #3
chris matthews commented@malcomio, this should be able to be solved by either:
1) having the module expose a config option for minimum SoundCloud embed width, and then apply that width to SoundCloud embeds only
OR
2) having the module always set the
max_widthoption on displays for remote_audio, which is the easier of the two fixes, and would work just as well.I'm not sure when a fix can get in a stable release so in the meantime your suggested workaround is best.
Comment #4
panchoSoundCloud's oEmbed endpoint returns a width of
"100%", which does not comply with the oEmbed specification:In #3641566: Fix query string and fragment handling in oEmbed and update URLs, the same is demonstrated for
hearthis.at.Some oEmbed consumers appear to handle percentage-based widths gracefully, although the specification requires the width to be expressed in pixels.
Drupal however casts
"100%"to integer100, resulting in an iframe that is only 100 pixels wide.