I'm trying to use soundmanager with cake. The matter is that I don't
want to place my audio files in webroot for security. For that reason,
i'm trying to use media views (http://book.cakephp.org/view/489/Media-
Views).

In my controller

function listen(){
        $this->header('Content-Type: audio/mpeg');
        $this->RequestHandler->setContent('mp3', 'audio/mpeg');
        $this->autoRender = 0;

        $this->layout = null;
        $this->view = 'Media';

        $this->set(array(
                'id' => 'petrucci_glasgow_kiss.mp3', // eventually this will be
parametrized
                'name' => 'friendly_song_name',
                'download' => true,
                'extension' => 'mp3',
                'path' => APP . 'files' . DS . 'audio' .  DS
        ));
}


When I run that method, after I set the content type the browser shows
the quicktime player, but seems like it cant find the actual file (it
shows a question mark).

Any Idea on what i'm doing wrong, or what am i missing.

This I intend to use both for streaming (soundmanager) and for file
downloads.

Thanks in advanced
Regards

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to