function emvideo_sevenload_extract in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 contrib/emvideo/providers/sevenload.inc \emvideo_sevenload_extract()
hook emvideo_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 video code to be used if the hook tests the code itself, it should return either the string of the video 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/
emvideo/ providers/ sevenload.inc, line 55 - This include processes Sevenload media files for use by emfield.module.
Code
function emvideo_sevenload_extract($embed = '') {
// src="http://de.sevenload.com/pl/zuh5KMt"
// http://de.sevenload.com/videos/zuh5KMt/Die-Zeit-rennt
// hint: de.sevenload.com can also be en.sevenload.com and probably other languages later
return array(
'@sevenload\\.com/pl/([^"]*)"@i',
'@sevenload\\.com/videos/(.*)/(.*)@i',
);
}