Fixed MIME type issues.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2664 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2008-10-14 12:55:27 +00:00
parent 1dd9aa5ddf
commit dc25beb8e4
1 changed files with 28 additions and 1 deletions

View File

@ -184,7 +184,34 @@ function outputVideoStream( $id, $src, $width, $height, $format, $title="" )
if ( file_exists( $src ) )
$mimeType = getMimeType( $src );
else
$mimeType = getMimeType( 'zm.'.$format );
{
switch( $format )
{
case 'asf' :
$mimeType = "video/x-ms-asf";
break;
case 'avi' :
case 'wmv' :
$mimeType = "video/x-msvideo";
break;
case 'mov' :
$mimeType = "video/quicktime";
break;
case 'mpg' :
case 'mpeg' :
$mimeType = "video/mpeg";
break;
case 'swf' :
$mimeType = "application/x-shockwave-flash";
break;
case '3gp' :
$mimeType = "video/3gpp";
break;
default :
$mimeType = "video/$format";
break;
}
}
if ( !$mimeType || ($mimeType == 'application/octet-stream') )
$mimeType = 'video/'.$format;
$objectTag = false;