public function get_real_type($find_handler = false
) { // Mime-types by handler.
$types_flash = array
('application/x-shockwave-flash', 'application/futuresplash'
); // Flash
$types_fmedia = array
('video/flv', 'video/x-flv','flv-application/octet-stream'
); // Flash Media Player
$types_quicktime = array
('audio/3gpp', 'audio/3gpp2', 'audio/aac', 'audio/x-aac', 'audio/aiff', 'audio/x-aiff', 'audio/mid', 'audio/midi', 'audio/x-midi', 'audio/mp4', 'audio/m4a', 'audio/x-m4a', 'audio/wav', 'audio/x-wav', 'video/3gpp', 'video/3gpp2', 'video/m4v', 'video/x-m4v', 'video/mp4', 'video/mpeg', 'video/x-mpeg', 'video/quicktime', 'video/sd-video'
); // QuickTime
$types_wmedia = array
('application/asx', 'application/x-mplayer2', 'audio/x-ms-wma', 'audio/x-ms-wax', 'video/x-ms-asf-plugin', 'video/x-ms-asf', 'video/x-ms-wm', 'video/x-ms-wmv', 'video/x-ms-wvx'
); // Windows Media
$types_mp3 = array
('audio/mp3', 'audio/x-mp3', 'audio/mpeg', 'audio/x-mpeg'
); // MP3
if ($this->
get_type() !== null
) { $type =
strtolower($this->type
);
} else { $type = null;
} // If we encounter an unsupported mime-type, check the file extension and guess intelligently.
if (!
in_array($type,
array_merge($types_flash,
$types_fmedia,
$types_quicktime,
$types_wmedia,
$types_mp3))) {