Location: PHPKode > projects > mediaIndex > classes/handler.quicktime.php
<?php
/**
 * $Id: handler.quicktime.php,v 1.8 2004/11/24 06:26:31 openface Exp $      
 *
 *               _ _        _         _                 
 *  _ __  ___ __| (_)__ _  (_)_ _  __| |_____ _____ _ _ 
 * | '  \/ -_) _` | / _` | | | ' \/ _` / -_) \ / -_) '_|
 * |_|_|_\___\__,_|_\__,_| |_|_||_\__,_\___/_\_\___|_|  
 *                                                     
 *     Standalone Indexer Script for Media Files
 *        jason hines, <hide@address.com>
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Library General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
 * General Public License for more details.
 */

include_once(_BASEPATH."/classes/handler.video.php");

/**
 * Handler class for Quicktime video formats (mov,mpeg)
 *
 * @version     $Revision: 1.8 $
 * @package     mediaIndexer
 * @subpackage  handlers
 * @author      jason hines, <hide@address.com>
 */

class quicktimeHandler extends videoHandler {

    public $iconName = "quicktime.gif";

    public function printMedia(file $file) {
        $info = $file->getRawInfo();
        $width = isset($info['video']) ? $info['video']['resolution_x'] : "480";
        $height = isset($info['video']) ? $info['video']['resolution_y']+16 : "320";
        echo "<OBJECT CLASSID=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" WIDTH=\"{$width}\" HEIGHT=\"{$height}\" CODEBASE=\"http://www.apple.com/qtactivex/qtplugin.cab\">\n";
        echo "<PARAM name=\"SRC\" VALUE=\""._MEDIAURL."{$file->path}\">\n";
        echo "<PARAM name=\"AUTOPLAY\" VALUE=\"false\">\n";
        echo "<PARAM name=\"CONTROLLER\" VALUE=\"true\">\n";
        echo "<embed src=\""._MEDIAURL."{$file->path}\" controller=\"true\" autoplay=\"false\" loop=\"false\" WIDTH=\"{$width}\" HEIGHT=\"{$height}\" pluginspage=\"http://www.apple.com/quicktime/download/\"></embed>\n";
        echo "</OBJECT>\n";
    }

}

?>
Return current item: mediaIndex