A DatoCMS plugin that allows content editors to easily embed Soundcloud, Mixcloud, Spotify and Anghami tracks and playlists.
Via the oEmbed standard we'll fetch the embed and meta data for the track. All the information you select is available via the Content Delivery Api.
Created By November Five
This package used to be called dato-cms-external-audio-field-plugin
but was deprecated in favour of the DatoCMS naming convention, the new package name is now datocms-plugin-external-audio-field
Install the plugin by following the DatoCMS guide: Installing Marketplace Plugins.
IMPORTANT!!: At the moment Mixcloud does not have the right CORS settings for their /oEmbed endpoint. To solve the you can provide a proxy url through which this plugin will fetch the embed response. We will try to call it with the full oEmbed url as a endpoint
query parameter. An example would be
If you want more help on the setup of this proxy you can always react out via the Issues
This is a JSON field extension. So you can use by adding a JSON field:
New field
JSON
button.Presentation
External Audio Field
In the record field you just copy paste and audio url from one of the supported providers (Soundcloud, Mixcloud, Spotify) and configure it the way you want. Each provider has some different players/options which you can select.
You should end up with something like this:
Output:
{ "oEmbed": { "version": 1, "type": "rich", "provider_name": "SoundCloud", "provider_url": "https://soundcloud.com", "height": 400, "width": "100%", "title": "BURN BEAST 001 - DABOUS by MDLBEAST", "description": "@waleed-abudabous Is a homegrown Saudi DJ/producer thats been crafting music for five years now and is known for his unique style of mixing various House Music genres ⚡", "thumbnail_url": "https://i1.sndcdn.com/artworks-cPivDyutshSD9GQz-wScohg-t500x500.jpg", "html": "<iframe width=\"100%\" height=\"160\" scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?height=160&label=Default&show_artwork=true&show_comments=true&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1224023323&visual=true\"></iframe>", "author_name": "MDLBEAST", "author_url": "https://soundcloud.com/mdlbeast" }, "options": { "variant": { "label": "Default", "value": { "label": "Default", "height": 160 }, "defaultToggles": { "show_artwork": true, "show_comments": false, "visual": false } }, "toggles": { "show_artwork": true, "show_comments": true, "visual": true } }, "url": "https://soundcloud.com/mdlbeast/dabous-1?in=mdlbeast/sets/burn-beast-riyadh-marathon&utm_source=clipboard&utm_medium=text&utm_campaign=social_sharing"}
Do you know some other options that I forgot? Check the Contributing guide on how to make suggestion for improvements of this plugin! Or you can make a PR if you want.
Reporting a bug: Open an issue explaining your application's setup and the bug you're encountering.
Suggesting an improvement: Open an issue explaining your improvement or feature so we can discuss and learn more.
Submitting code changes: For small fixes, feel free to open a pull request with a description of your changes. For large changes, please first open an issue so we can discuss if and how the changes should be implemented.
For more information check the CONTRIBUTING.md document.
Copyright (c) November Five BVBA. All rights reserved.
Licensed under the MIT License.