You are here

function emaudio_podomatic_extract in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 5 contrib/emaudio/providers/podomatic.inc \emaudio_podomatic_extract()
  2. 6 contrib/emaudio/providers/podomatic.inc \emaudio_podomatic_extract()

hook emaudio_PROVIDER_extract this is called to extract the video code from a pasted URL or embed code.

Parameters

$embed: an optional string with the pasted URL or embed code

Return value

either an array of regex expressions to be tested, or a string with the audio code to be used if the hook tests the code itself, it should return either the string of the audio code (if matched), or an empty array. otherwise, the calling function will handle testing the embed code against each regex string in the returned array.

File

contrib/emaudio/providers/podomatic.inc, line 57
This include processes Podomatic audio files for use by emaudio.module.

Code

function emaudio_podomatic_extract($embed = '') {

  // http://www.podomatic.com/podcast/embed/funkylondon
  // <object width="320" height="315"><param name="movie" value="http://www.podOmatic.com/flash/flashcatcher.swf"></param><embed type="application/x-shockwave-flash" src="http://www.podOmatic.com/flash/flashcatcher.swf" width="320" height="315" flashvars="playlist_url=http://funkylondon.podOmatic.com/xspf.xspf" ></embed></object><br /><a href="http://www.podOmatic.com/podcast/embed/funkylondon" style="text-decoration: none"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#0033ff"><strong>Click here to get your own player.</strong></font></a><br><br>
  // http://funkylondon.podomatic.com
  return array(
    '@podomatic\\.com/podcast/embed/([^"\\&]+)@i',
    '@playlist_url\\=http://([^\\.]+)\\.podOmatic\\.com@i',
    '@http://([^\\.]+)\\.podomatic\\.com@i',
  );
}