function getShortDesc( $file ) { global $wgLang; $metadata = $this->unpackMetadata( $file->getMetadata() ); $streamTypes = $this->getStreamTypes( $file ); if ( !$streamTypes ) { return parent::getShortDesc( $file ); } if ( isset( $metadata['video'] ) && $metadata['video'] ) { // Count multiplexed audio/video as video for short descriptions $msg = 'wah-short-video'; } elseif ( isset( $metadata['audio'] ) && $metadata['audio'] ) { $msg = 'wah-short-audio'; } else { $msg = 'wah-short-general'; } return wfMsg( $msg, implode( '/', $streamTypes ), $wgLang->formatTimePeriod( $this->getLength( $file ) ) ); }
function getShortDesc($file) { global $wgLang, $wgOggAudioTypes, $wgOggVideoTypes; $streamTypes = $this->getStreamTypes($file); if (!$streamTypes) { return parent::getShortDesc($file); } if (array_intersect($streamTypes, $wgOggVideoTypes)) { // Count multiplexed audio/video as video for short descriptions $msg = 'ogg-short-video'; } elseif (array_intersect($streamTypes, $wgOggAudioTypes)) { $msg = 'ogg-short-audio'; } else { $msg = 'ogg-short-general'; } return wfMsg($msg, implode('/', $streamTypes), $wgLang->formatTimePeriod($this->getLength($file))); }
function getShortDesc() { $handler = $this->getHandler(); if ($handler) { return $handler->getShortDesc($this); } else { return MediaHandler::getShortDesc($this); } }