How to echo and play videos in Cakephp

2013-02-28 Thread Victor Musvibe
I have an application were by users can upload images and should be able to 
echo and play videos. My upload function works fine but challenge that i am 
having now is to echo and play the video. Here is how i am uploading the 
file

function uploadFile() {
$file = $this-data['CpdVideo']['file'];
if ($file['error'] === UPLOAD_ERR_OK) {
$id = String::uuid();
if (move_uploaded_file($file['tmp_name'], WWW_ROOT . 'files/videos/' . 
$file['name'])) {
$this-request-data['CpdVideo']['filename'] = $file['name'];
$this-request-data['CpdVideo']['filesize'] = $file['size'];
$this-request-data['CpdVideo']['filemime'] = $file['type'];
return true;
}
}
return false;
}

Here is how i am saving the video

if ($this-uploadFile()  $this-CpdVideo-save($this-data))

This how i am trying to echo and play the video in my view.ctp

?php echo $this-Html-media('files/videos'. 
$cpdVideo['CpdVideo']['filename'], array('fullBase' = true)); 

If any one could help me out that would be awesome

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to echo and play videos in Cakephp

2013-02-28 Thread Marcus James
You can use jPlayer http://www.jplayer.org/

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to echo and play videos in Cakephp

2013-02-28 Thread Chetan Patel
You can also use http://videojs.com/

On Thu, Feb 28, 2013 at 2:18 PM, Marcus James marco...@gmail.com wrote:

 You can use jPlayer http://www.jplayer.org/

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
Thanks  Regards

Chetan Patel

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.