You are here

function emaudio_soundcloud_extract in Media: SoundCloud 6

Implementation of 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

providers/soundcloud.inc, line 86
This include processes Soundcloud audio files for use by emaudio.module.

Code

function emaudio_soundcloud_extract($embed = '') {
  return array(
    '@soundcloud\\.com/([^"\\&]+)@i',
  );
}