Create a video for each event view.
This determines the appropriate video format based on the user agent, creates the video, and then returns the video path to the view.
This commit is contained in:
parent
5844a1cc89
commit
8aec78258b
|
@ -58,6 +58,14 @@ public function index() {
|
||||||
throw new NotFoundException(__('Invalid event'));
|
throw new NotFoundException(__('Invalid event'));
|
||||||
}
|
}
|
||||||
$this->set('event', $event);
|
$this->set('event', $event);
|
||||||
|
|
||||||
|
if (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
|
||||||
|
$videoFormat = 'webm';
|
||||||
|
} else {
|
||||||
|
$videoFormat = 'mp4';
|
||||||
|
}
|
||||||
|
$this->set('videoSrc', $this->Event->createVideo( $id, $videoFormat, 100, 100 ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete($id) {
|
public function delete($id) {
|
||||||
|
|
Loading…
Reference in New Issue