Jump to content

More help needed with some code (paging rasteri!)


Steve

Recommended Posts

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 Mixcloud

The 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-f2d3af455ff2
I 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.
Link to comment
Share on other sites

Guest rasteri

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?

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest rasteri

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...