Camen Design Forum

Video Embedding


You will need 2 things to add support for a service:

1. The HTML that you will need to put in place of the URL. Examples of this can be seen on the lines starting with `$replace`.
2. A regular expression that parses the URL of the service and can extract whatever data (like a video ID) you need in the HTML.

You can extend the current regular expression with as many URLs as you would like it to match. So adding liveleak and vimeo doesn’t have to be a problem. But you’ll need to know a little about regular expressions.

After extending it you can add another `if` block with another `$replace` value. That’s it. I am happy to answer some more specific questions, of course!


(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn