From be5f0cd4a9c24e76ff2d4bbe7e1104adabe908b5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 29 Apr 2016 10:44:46 -0400 Subject: [PATCH] replace OutputVideoStream and OutputImageStream with versions that return a string. Call getStreamHTML before we output the headers because we use streamMode and streamSrc in the header .js.php --- web/includes/functions.php | 279 +++++++++++++++---------------- web/skins/classic/views/zone.php | 6 +- 2 files changed, 136 insertions(+), 149 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 9a8264548..459a3772d 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -229,154 +229,137 @@ function getMimeType( $file ) return( trim( exec( 'file -bi '.escapeshellarg( $file ).' 2>/dev/null' ) ) ); } -function outputVideoStream( $id, $src, $width, $height, $format, $title="" ) -{ - if ( file_exists( $src ) ) - $mimeType = getMimeType( $src ); - else - { - 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; - if ( ZM_WEB_USE_OBJECT_TAGS ) - { - switch( $mimeType ) - { - case "video/x-ms-asf" : - case "video/x-msvideo" : - case "video/mp4" : - { - if ( isWindows() ) - { -?> - - - - - - - - - - - - - - - - - - - - - - - - - -src="" -name="" -width="" -height="" -autostart="1" -autoplay="1" -showcontrols="0" -controller="0"> - - -