is_video()) { return true; } //swf mime type is application/x-shockwave-flash return $asset->has_ext('swf'); } /** * * @param HttpResource $asset */ public function render($asset) { if (!$this->accept($asset)) { return; } $url = $asset->url(); $title = $asset->title(); $description = $asset->get_meta('description'); $keywords = $asset->get_meta('keywords'); $size = (int) $asset->config('size'); $size = (24 <= $size && $size <= 800) ? $size : 300; $width = $size; $height = $size *9/16; $embed = << EOT; $result = array(); $result[self::EMBED_SNIPPET] = $embed; $result[self::TITLE] = $title; $result[self::DESCRIPTION] = $description; $result[self::TAGS] = $keywords; return $result; } }