Description | Displays a Soundcloud clip. |
Availability | Stable |
Required Script | <script async custom-element="amp-soundcloud" src="https://cdn.ampproject.org/v0/amp-soundcloud-0.1.js"></script> |
Supported Layouts | fixed-height |
Examples | amp-soundcloud.html soundcloud.amp.html |
Visual Mode:
<amp-soundcloud height=657
layout="fixed-height"
data-trackid="243169232"
data-visual="true"></amp-soundcloud>
Classic Mode:
<amp-soundcloud height=657
layout="fixed-height"
data-trackid="243169232"
data-color="ff5500"></amp-soundcloud>
data-trackid
The ID of the track, an integer.
data-secret-token
The secret token of the track, if it is private.
data-visual
Value: "true"
or "false"
Default value: "false"
If set to true, displays full width "Visual" mode. Otherwise, displays "Classic" mode.
data-color
Value: Hexadecimal color value (without the leading #).
E.g. data-color="e540ff"
Custom color override for the "Classic" mode. Ignored in "Visual" mode.
width and height
Layout is fixed-height
and will fill all the available horizontal space. This is ideal for "Classic" mode, but for "Visual", height is recommended to be 300px, 450px or 600px, as per Soundcloud embed code. This will allow the clip's internal elements to resize properly on mobile.
See amp-soundcloud rules in the AMP validator specification.