public function parseEntry($entry) { if (isset($entry['entryId'])) { $video = new KalturaVideoObject(); $video->setID($entry['entryId']); $video->setTitle($entry['title']); $video->setDescription($entry['description']); $ts = $entry['updatedAt']; // there is also a 'createdAt' property that could be used instead $video->setPublished(new DateTime("@{$ts}")); $video->setStillFrameImage($entry['thumbnail']['url']); $video->setImage($entry['thumbnailUrl']['url']); $video->setDuration($entry['media']['duration'] / 1000); // Need to convert to seconds $tags = Kurogo::arrayVal($entry, 'tags', array()); $video->setTags(Kurogo::arrayVal($tags, 'tag', array())); // currently an array of tags $video->setVideoSources($entry['itemContent']); $video->setSubtitleTracks($entry['subTitles']); return $video; } }
protected function parseEntry($entry) { $video = new KalturaVideoObject(); // "Media" object to video $video->setID($entry->id); $video->setURL($entry->downloadUrl); $video->setTitle($entry->name); $video->setDescription($entry->description); //duration in milliseconds $video->setDuration(floor($entry->duration/1000)); //date in milliseconds $published = new DateTime('@' . floor($entry->updateAt / 1000)); $video->setPublished($published); $video->setImage($entry->thumbnailUrl); return $video; }