Jump to content

How can I get Mixcloud and HeartThis to auto-embed?


cualupe

Recommended Posts

Posted
9 hours ago, Nathan Explosion said:

Post in the Product Feedback forum to request them to be added to the functionality - mixcloud supports oembed

I can't find any reference to oembed on the hearthis site though.

So how does that work? IPS devs add them over time and a new update is released or something?

Posted

Pretty much - target site supoorts oembed, IPS integrates a check/lookup for the target site url and then presents the embeded content.

Example: take a look at the oembed response for the mixcloud link in the link I added above:

https://www.mixcloud.com/oembed/?url=https%3A//www.mixcloud.com/spartacus/party-time/&format=json

{
    "provider_url": "https://www.mixcloud.com", 
    "image": "//thumbnail.mixcloud.com/w/600/h/600/q/85/upload/images/extaudio/61a1279f-e3c0-4871-aa8e-c4cf5466edb8.png", 
    "author_name": "Spartacus", 
    "height": 328, 
    "cache_age": 86400, 
    "embed": "<iframe width=\"300\" height=\"300\" src=\"https://www.mixcloud.com/widget/iframe/?autoplay=&amp;embed_type=widget_standard&amp;embed_uuid=a04e956f-1cde-4e72-bf65-82265c98c240&amp;feed=https%3A%2F%2Fwww.mixcloud.com%2Fspartacus%2Fparty-time%2F&amp;hide_artwork=&amp;hide_cover=&amp;hide_tracklist=&amp;light=&amp;mini=&amp;replace=0&amp;stylecolor=\" frameborder=\"0\"></iframe><div style=\"clear:both; height:3px; width:300;\"></div><p style=\"display:block; font-size:11px; font-family: 'Open Sans', Helvetica, Arial, sans-serif; margin:0; padding: 3px 4px; color:#999; width:300;\"><a href=\"https://www.mixcloud.com/spartacus/party-time/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=resource_link\" target=\"_blank\" style=\"color:#808080; font-weight:bold;\">Party Time</a><span> by </span><a href=\"https://www.mixcloud.com/spartacus/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=profile_link\" target=\"_blank\" style=\"color:#808080; font-weight:bold;\">Spartacus</a><span> on </span><a href=\"https://www.mixcloud.com/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=homepage_link\" target=\"_blank\" style=\"color:#808080; font-weight:bold;\"> Mixcloud</a></p><div style=\"clear:both; height:3px;\"></div>", 
    "title": "Party Time", 
    "url": "https://www.mixcloud.com/spartacus/party-time/", 
    "html": "<iframe width=\"300\" height=\"300\" src=\"https://www.mixcloud.com/widget/iframe/?autoplay=&amp;embed_type=widget_standard&amp;embed_uuid=a04e956f-1cde-4e72-bf65-82265c98c240&amp;feed=https%3A%2F%2Fwww.mixcloud.com%2Fspartacus%2Fparty-time%2F&amp;hide_artwork=&amp;hide_cover=&amp;hide_tracklist=&amp;light=&amp;mini=&amp;replace=0&amp;stylecolor=\" frameborder=\"0\"></iframe><div style=\"clear:both; height:3px; width:300;\"></div><p style=\"display:block; font-size:11px; font-family: 'Open Sans', Helvetica, Arial, sans-serif; margin:0; padding: 3px 4px; color:#999; width:300;\"><a href=\"https://www.mixcloud.com/spartacus/party-time/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=resource_link\" target=\"_blank\" style=\"color:#808080; font-weight:bold;\">Party Time</a><span> by </span><a href=\"https://www.mixcloud.com/spartacus/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=profile_link\" target=\"_blank\" style=\"color:#808080; font-weight:bold;\">Spartacus</a><span> on </span><a href=\"https://www.mixcloud.com/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=homepage_link\" target=\"_blank\" style=\"color:#808080; font-weight:bold;\"> Mixcloud</a></p><div style=\"clear:both; height:3px;\"></div>", 
    "width": 300, 
    "version": "1.0", 
    "author_url": "https://www.mixcloud.com/spartacus/", 
    "provider_name": "Mixcloud", 
    "type": "rich"
}

See the 'embed' code.....that link above would (could) result in that code being placed in the editor and result in the embedded version of the following link:

https://www.mixcloud.com/spartacus/party-time/

Basically - if the target site supports oembed then IPS can implement support for it. Would be cool if it could happen without the need for updates from IPS though :D

 

Posted
6 hours ago, Nathan Explosion said:

Would be cool if it could happen without the need for updates from IPS though :D

 

Yeah you're not wrong. That's how it used to work for me on phpbb3 and bbcode. Having to wait for updates from the supplier is a bit of a pain.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...