This package used to be called dato-cms-external-audio-field-plugin but was deprecated in favour of the Dato naming convention, the new package name is now datocms-plugin-external-audio-field
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
Usage
This is a JSON field extension. So you can use by adding a JSON field:
On the model/block you want to add the field to click New field
In the popup modal select the JSON button.
Give it a sensible name
Select the tab Presentation
In the field editor dropdown select: 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 âš¡",
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.
Contributing
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.