Monday, November 30, 2009

Re: Problem serving video to Mac/Safari/Quicktime

I solved this problem by creating a method that returns the video file
using @readfile()

So the source for my embed tag looks like this:

<param name="SRC" value="/user_files/get_file/<?php echo $file_id; ?>/
<?php echo $session->id(); ?>">

Then in Controller, I have

function beforeFilter() {
if($this->action == 'get_file') {
$this->Session->id($this->params['pass'][1]);
$this->Session->start();
}
parent::beforeFilter();
$this->Auth->allowedActions = array();
}

This method have no security compromise.
Hope this helps.
Best,
Dyske

-
Dyske Suematsu
R+D STUDIO
419 Lafayette Street, 2nd Floor
New York, NY 10003
http://rdsny.com
Phone: 646.723.3943


On Sep 3, 11:18 am, Martin Westin <martin.westin...@gmail.com> wrote:
> Hi,
> I was wondering if anyone had a good way they use to serve video that
> works forQuicktimeinsideSafarion aMac?
>
> Sound simple, right? Just use Media view.
> Problem is that after much checking Charles (debug proxy) clued me in
> on the fact that when you serve the file, the browser first loads it,
> then the plugin loads it aswell. This is a second request with a
> different user agent and you probably know how Cake treat that kind of
> request. Session expires, user logged out and so on.
>
> The only way past it I have found so far is to drop agent checking but
> I am hoping there is a better way. Any ideas?
>
> /Martin

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: