You are here

function emvideo_myspace_duration in Embedded Media Field 6

Same name and namespace in other branches
  1. 6.3 contrib/emvideo/providers/myspace.inc \emvideo_myspace_duration()

hook emvideo_PROVIDER_duration($item) Returns the duration of the video in seconds.

Parameters

$item: The video item itself, which needs the $data array. @return The duration of the video in seconds.

File

contrib/emvideo/providers/myspace.inc, line 105
This include processes myspace.com media files for use by emfield.module.

Code

function emvideo_myspace_duration($item) {
  if (!isset($item['data']['emvideo_myspace_version'])) {
    $item['data'] = emvideo_myspace_data(NULL, $item);
  }
  return isset($item['data']['ITEM']['MEDIA:CONTENT'][1]['DURATION']) ? $item['data']['ITEM']['MEDIA:CONTENT'][1]['DURATION'] : 0;
}