Steve Posted February 7, 2015 Share Posted February 7, 2015 Mixcloud have changed their embed code, so the automatic embedding no longer works on DV. I'm trying to figure out the new code, but I can't get it to work. Here's the regex: - http(s)?://www.mixcloud.com/{1}/{2}/And here's some example embed code using a link to one of my mixes (copy and paste it into Notepad so you can read it easier): - XL-FM Guest Mix by Sigma on MixcloudThe latter part of the code creates links to the mix on Mixcloud underneath the player, so that's not needed as the embedded player includes that anyway. Really it's just the part up to and including that's required, but I can't figure out the replacement match code. Any ideas? Perhaps it's this that's the problem: - embed_uuid=15c32cbf-4581-41ab-979b-f2d3af455ff2I assume that's a unique string, but if so I don't see how it's possible to do this given that only the information in the URL can be parsed. Quote Link to comment Share on other sites More sharing options...
Guest rasteri Posted February 7, 2015 Share Posted February 7, 2015 It is a unique string but I've just tested it and it's not mandatory to include it in the iframe parameters. Is the regex not matching at all, or is it extracting the wrong info? Can I see what substitution string you're using? 1 Quote Link to comment Share on other sites More sharing options...
Steve Posted February 7, 2015 Author Share Posted February 7, 2015 I've deleted it now, as it didn't work, but basically I just put "www.mixcloud.com/$1/$2/" in place of the part that references my specific mix. I also tried removing the unique string code, but that didn't work either. In both cases the player embedded, but it just said "we can't find that specific sound" or something like that, so the player wasn't linking to the mix correctly. Quote Link to comment Share on other sites More sharing options...
Guest rasteri Posted February 7, 2015 Share Posted February 7, 2015 Maybe you tried this already, but you need to put "%2F"s in place of the slashes in the substitution string, i.e. : <iframe src="https://www.mixcloud.com/widget/iframe/?feed=https%3A%2F%2Fwww.mixcloud.com%2F$1%2F$2%2F" frameborder="0" height="360" width="660"></iframe>If that still doesn't work, can you post the HTML it generates so we can have a look? Quote Link to comment Share on other sites More sharing options...
Steve Posted February 7, 2015 Author Share Posted February 7, 2015 That results in a player being embedded, but it just says "Sorry we can't find that content", which is the same error message I was getting. I don't know how I can see what HTML is being generated. Quote Link to comment Share on other sites More sharing options...
Guest rasteri Posted February 7, 2015 Share Posted February 7, 2015 Just view the source of the page in your browser, then search for "iframe" so you jump to the right bit. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.