You are here

function emvideo_archive_duration in Embedded Media Field 6

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/archive.inc, line 239
This is an archive.org provider include file for Embedded Media Video.

Code

function emvideo_archive_duration($item) {
  if (!isset($item['data']['emvideo_archive_version'])) {
    $item['data'] = emvideo_archive_data(NULL, $item);
  }
  return isset($item['data']['metadata']['RUNTIME'][0]) ? emvideo_convert_to_seconds($item['data']['metadata']['RUNTIME'][0]) : 0;
}